diff --git a/mbuni/mmlib/mms_msg.c b/mbuni/mmlib/mms_msg.c index e160762..5a87756 100644 --- a/mbuni/mmlib/mms_msg.c +++ b/mbuni/mmlib/mms_msg.c @@ -1366,9 +1366,18 @@ MmsMsg *mms_frommime(MIMEEntity *mime) } mime_entity_destroy(mx); /* Because all its bits are used above. XXX not very clean! */ - /* Now check for important headers. If missing, put them in */ - m->msgId = http_header_value(m->headers, octstr_imm("Message-ID")); + /* Now check for important headers. If missing, put them in - MsgId fixup - Vince */ + s = http_header_value(m->headers, octstr_imm("Message-ID")); + if (s) { + octstr_replace(s, octstr_imm("<"), octstr_imm("")); + octstr_replace(s, octstr_imm(">"), octstr_imm("")); + http_header_remove_all(m->headers, "Message-ID"); + http_header_add(m->headers, "Message-ID", octstr_get_cstr(s)); + m->msgId = octstr_duplicate(s); + octstr_destroy(s); + } + /* Default type is send */ if ((s = http_header_value(m->headers, octstr_imm("X-Mms-Message-Type"))) == NULL || octstr_compare(s, octstr_imm("MM4_forward.REQ")) == 0) {