diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 7a88a28..2fd4cad 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,7 @@ +2008-09-15 P. A. Bagyenda + * Order of XML tags in MM7 packet changed (shouldn't matter, but...) +2008-09-12 P. A. Bagyenda + * Improved reporting of DLR Message-ID even with relay 2008-09-12 P. A. Bagyenda * Added facility for appending special response header to each message (mime) part in MM7 response * Added mmsbox cdr logging diff --git a/mbuni/mmlib/mms_mm7soap.c b/mbuni/mmlib/mms_mm7soap.c index fced4cb..1694b5b 100644 --- a/mbuni/mmlib/mms_mm7soap.c +++ b/mbuni/mmlib/mms_mm7soap.c @@ -1063,19 +1063,6 @@ MSoapMsg_t *mm7_mmsmsg_to_soap(MmsMsg *msg, Octstr *from, List *xto, octstr_destroy(s); } - if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Delivery-Report"))) != NULL) { - char *val = (octstr_case_compare(s, octstr_imm("Yes")) == 0) ? - "true" : "false"; - http_header_add(m->envelope, "DeliveryReport", val); - octstr_destroy(s); - } - - if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Read-Report"))) != NULL) { - char *val = (octstr_case_compare(s, octstr_imm("Yes")) == 0) ? - "true" : "false"; - http_header_add(m->envelope, "ReadReply", val); - octstr_destroy(s); - } /* Track adaptations stuff -- Vincent */ if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Allow-Adaptations"))) != NULL) { char *val = (octstr_case_compare(s, octstr_imm("true")) == 0) ? @@ -1097,11 +1084,28 @@ MSoapMsg_t *mm7_mmsmsg_to_soap(MmsMsg *msg, Octstr *from, List *xto, octstr_destroy(s); } - if (isclientside) { + if (isclientside) { /* We need this twice because of stupid parsers out there that + * care about the order of XML fields. + */ if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Expiry"))) != NULL) { http_header_add(m->envelope, "ExpiryDate", octstr_get_cstr(s)); octstr_destroy(s); } + + if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Delivery-Report"))) != NULL) { + char *val = (octstr_case_compare(s, octstr_imm("Yes")) == 0) ? + "true" : "false"; + http_header_add(m->envelope, "DeliveryReport", val); + octstr_destroy(s); + } + + if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Read-Report"))) != NULL) { + char *val = (octstr_case_compare(s, octstr_imm("Yes")) == 0) ? + "true" : "false"; + http_header_add(m->envelope, "ReadReply", val); + octstr_destroy(s); + } + } if ((s = mms_get_header_value(msg, octstr_imm("X-Mms-Priority"))) != NULL) {