From a8c3ddccf7cb5b3e43c54f97edb94b8afad61e8d Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Wed, 28 Mar 2007 12:13:44 +0000 Subject: [PATCH] Small fixup to remove < > from message id --- mbuni/mmlib/mms_msg.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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) {