Hi all,

This is a small patch to clear a bit the current CVS code:
Details:

- in mmsbox/bearerbox.c
: adding a new value 'desc' to grab description ("StatusText") from mm7
: moving some debug strings to a better understanding string.
: Log that we are sending a DLR

- in mmsbox/mmsbox_cfg.c
: Information about MMSC allowed/denied  IPs at start.

- in mmlib/mms_msg.c
: Cleaning debug strings.

- in mmsc/mmsglobalsender.c
: Cleaning debug strings.

- in mmsc/mmsproxy.c
: Cleaning debug strings.


--
Telemaque - 06560 SOPHIA-ANTIPOLIS - (FR)
Service Technique/Reseau - NOC Developpement SMS/MMS/Kiosques
http://www.telemaque.fr/
[EMAIL PROTECTED]
Tel : +33 4 92 90 99 84 (fax 9142)
diff -rbau /mbuni-cvs/mmsbox/bearerbox.c /mbuni/mmsbox/bearerbox.c
--- /mbuni-cvs/mmsbox/bearerbox.c       2007-03-22 19:28:15.000000000 +0100
+++ /mbuni/mmsbox/bearerbox.c   2007-03-13 23:55:10.000000000 +0100
@@ -124,7 +127,7 @@
     MSoapMsg_t *mreq = NULL, *mresp = NULL;
     int hstatus = HTTP_OK;
     List *rh = NULL;
-     Octstr *reply_body = NULL, *value;
+     Octstr *reply_body = NULL, *value, *desc;
List *to = NULL;
     Octstr *from = NULL, *subject = NULL,  *vasid = NULL, *msgid = NULL;

@@ -197,11 +201,18 @@
break; case MM7_TAG_DeliveryReportReq:
+          desc = mm7_soap_header_value(mreq, octstr_imm("StatusText"));
         msgid = mm7_soap_header_value(mreq, octstr_imm("MessageID"));
         value = mm7_soap_header_value(mreq, octstr_imm("MMStatus"));
+ info(0, "Sending delivery-report [FROM:%s] [VALUE:%s] [DESC:%s] [MSGID:%s]",
+              octstr_get_cstr(from), octstr_get_cstr(value), 
octstr_get_cstr(desc),
+              octstr_get_cstr(h->m->id));
         send_report(from, "delivery-report", value, msgid, h->m->id);

+          if (desc)
+               octstr_destroy(desc);
         if (value)
              octstr_destroy(value);
mms_log("DeliveryReport", @@ -235,7 +246,7 @@
         http_close_client(h->client);

     debug("mmsbox.mm7sendinterface", 0,
-          " --> leaving mm7dispatch interface, mresp=%s, body=%s, mm7_status=%d <-- 
",
+          " --> leaving mm7dispatch interface, mresp=[%s], body=[%s], mm7_status=[%d] 
<-- ",
          mresp ? "ok" : "(null)",
          reply_body ? "ok" : "(null)", status);
@@ -287,7 +298,7 @@
     int mtype;
debug("mmsbox.mm7eaif.sendinterface", 0, - " --> Enterred eaif send interface, blen=%d <--- ", + " --> Enterred eaif send interface, blen=[%d] <--- ", msize);

hfrom = http_header_value(h->headers, octstr_imm("X-NOKIA-MMSC-From")); @@ -450,9 +461,10 @@ h.ua = http_header_value(h.headers, octstr_imm("User-Agent")); debug("mmsbox", 0, - " MM7 Incoming, ip=%s, mmsc id=%s ", + " MM7 Incoming, IP=[%s], MMSC=[%s], dest_port=[%ld] ", h.ip ? octstr_get_cstr(h.ip) : "", - octstr_get_cstr(m->id)); + octstr_get_cstr(m->id), + m->incoming.port); /* Dump headers, url etc. */
#if 1
@@ -469,7 +481,7 @@
http_send_reply(h.client, HTTP_UNAUTHORIZED, hh, octstr_imm("Authentication failed")); http_destroy_headers(hh);
-                   info(0, "MMSBox: Auth failed, incoming connection, MMC 
group=%s",
+                   info(0, "MMSBox: Auth failed, incoming connection, MMC 
group=[%s]",
                        m->id ? octstr_get_cstr(m->id) : "(none)");
              } else if (m->type == SOAP_MMSC)
                   mm7soap_receive(&h);
@@ -499,7 +511,7 @@
{

     debug("free info", 0,
-          " entered free_clientinfo %d, ip=%ld", freeh, (long)h->ip);
+          " entered free_clientinfo %d, ip=[%ld]", freeh, (long)h->ip);
if (h->ip) octstr_destroy(h->ip);
@@ -575,7 +587,7 @@
hstatus = mmsbox_url_fetch_content(HTTP_METHOD_POST, mmc->mmsc_url, rh, body, &ph,&rbody); if (http_status_class(hstatus) != HTTP_STATUS_SUCCESSFUL) {
-         *error = octstr_format("Failed to contact MMC[url=%s] => HTTP returned 
status = %d!",
+         *error = octstr_format("Failed to contact MMC[url=%s] => HTTP returned 
status=[%d]!",
                                octstr_get_cstr(mmc->mmsc_url), hstatus);
         goto done1;
     }
@@ -602,7 +614,7 @@
         if (detail == NULL)
              mm7_soap_header_value(mresp, octstr_imm("faultcode"));
         ret = NULL;
- info(0, "Send to MMSC[%s], failed, code=[%d=>%s], detail=%s", + info(0, "Send to MMSC[%s], failed, code=[%d=>%s], detail=[%s]", mmc ? octstr_get_cstr(mmc->id) : "", tstatus, mms_soap_status_to_cstr(tstatus), detail ? octstr_get_cstr(detail) : "");
@@ -618,7 +630,7 @@
} else ret = mm7_soap_header_value(mresp, octstr_imm("MessageID")); - info(0, "Sent to MMC[%s], code=[%d=>%s], msgid [%s]", octstr_get_cstr(mmc->id), + info(0, "Sent to MMC[%s], code=[%d=>%s], msgid=[%s]", octstr_get_cstr(mmc->id), tstatus, mms_soap_status_to_cstr(tstatus), ret ? octstr_get_cstr(ret) : "(none)"); if (ret)

diff -rbau /mbuni-cvs/mmsbox/mmsbox_cfg.c /mbuni/mmsbox/mmsbox_cfg.c
--- /mbuni-cvs/mmsbox/mmsbox_cfg.c      2006-10-12 17:21:46.000000000 +0200
+++ /mbuni/mmsbox/mmsbox_cfg.c  2007-01-30 11:23:56.000000000 +0100
@@ -153,6 +153,8 @@
m->incoming.allow_ip = mms_cfg_get(x, octstr_imm("allow-ip")); m->incoming.deny_ip = mms_cfg_get(x, octstr_imm("deny-ip"));
+          info(0, "MMSC[%s], allow=[%s], deny=[%s]", octstr_get_cstr(m->id),
+              octstr_get_cstr(m->incoming.allow_ip), 
octstr_get_cstr(m->incoming.deny_ip));
         m->incoming.user = _mms_cfg_getx(x, octstr_imm("incoming-username"));
         m->incoming.pass = _mms_cfg_getx(x, octstr_imm("incoming-password"));
         mms_cfg_get_int(x, octstr_imm("incoming-port"), &m->incoming.port);



diff -rbau /mbuni-cvs/mmlib/mms_msg.c /mbuni/mmlib/mms_msg.c
--- /mbuni-cvs/mmlib/mms_msg.c  2007-03-21 16:16:17.000000000 +0100
+++ /mbuni/mmlib/mms_msg.c      2007-01-30 23:18:56.000000000 +0100
@@ -278,7 +278,7 @@
     ret = wsp_field_value(context, &val);

     if (parse_error(context)) {
-         warning(0, "Faulty header [code=%d], skipping remaining headers.", 
field_type);
+         warning(0, "Faulty header [code = %d], skipping remaining headers.", 
field_type);
         parse_skip_to_limit(context);
         return -1;
     }
@@ -598,7 +598,7 @@
     return val;
value_error:
-     warning(0, "Skipping faulty header [code = %d, val=%d]!", field_type, 
val);
+     warning(0, "Skipping faulty header [code=%d, val=%d]!", field_type, val);
octstr_destroy(decoded); return -1;
}


diff -rbau /mbuni-cvs/mmsc/mmsglobalsender.c /mbuni/mmsc/mmsglobalsender.c
--- /mbuni-cvs/mmsc/mmsglobalsender.c   2007-03-21 16:16:19.000000000 +0100
+++ /mbuni/mmsc/mmsglobalsender.c       2007-03-23 10:59:23.000000000 +0100
@@ -539,7 +531,7 @@
     void *xx;
     Octstr *s;
- info(0, "MMS Relay: Send[soap] to VASP[%s], msg type [%s], from %s, to %s", + info(0, "MMS Relay: Send[soap] to VASP[%s], msg_type=[%s], from=[%s], to=[%s]", vasp ? octstr_get_cstr(vasp->id) : "", mms_message_type_to_cstr(mtype), octstr_get_cstr(from), octstr_get_cstr(to)); @@ -637,7 +629,7 @@
     char *msgtype;

- info(0, "MMS Relay: Send [eaif] to VASP[%s], msg type [%s], from %s, to %s", + info(0, "MMS Relay: Send[eaif] to VASP[%s], msg_type=[%s], from=[%s], to=[%s]", vasp ? octstr_get_cstr(vasp->id) : "", mms_message_type_to_cstr(mtype), octstr_get_cstr(from), octstr_get_cstr(to));


diff -rbau /mbuni-cvs/mmsc/mmsproxy.c /mbuni/mmsc/mmsproxy.c
--- /mbuni-cvs/mmsc/mmsproxy.c  2006-12-20 11:08:54.000000000 +0100
+++ /mbuni/mmsc/mmsproxy.c      2007-01-28 13:10:27.000000000 +0100
@@ -1600,7 +1600,7 @@
     if (mreq)
         msgtype = mms_mm7tag_to_cstr(mm7_msgtype(mreq));
     debug("mmsprox.mm7sendinterface", 0,
-          " --> Enterred mm7dispatch interface, mreq=%s mtype = %s <-- ",
+          " --> Enterred mm7dispatch Proxy interface, mreq=%s mtype = %s <-- ",
          mreq ? "Ok" : "Null",
          mreq ? (char *)msgtype : "Null");
@@ -1756,7 +1756,7 @@
         http_close_client(h->client);

     debug("mmsprox.mm7sendinterface", 0,
-          " --> leaving mm7dispatch interface, mresp=%s, body=%s <-- ",
+          " --> leaving mm7dispatch Proxy interface, mresp=%s, body=%s <-- ",
          mresp ? "ok" : "(null)",
          reply_body ? "ok" : "(null)");
_______________________________________________
Devel mailing list
Devel@mbuni.org
http://lists.mbuni.org/mailman/listinfo/devel

Reply via email to