From bf9218da7858baf8093077d086ecf7297d222f7d Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Thu, 28 Aug 2008 09:40:52 +0000 Subject: [PATCH] *** empty log message *** --- mbuni/mmlib/mms_cfg.c | 2 +- mbuni/mmsbox/mmsbox.c | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/mbuni/mmlib/mms_cfg.c b/mbuni/mmlib/mms_cfg.c index fc712b3..42f34c2 100644 --- a/mbuni/mmlib/mms_cfg.c +++ b/mbuni/mmlib/mms_cfg.c @@ -115,7 +115,7 @@ static void check_and_add_field(mCfgGrp *grp, Octstr *field, Octstr *value, int info(0, "field `%s' is not expected within group `%s' at line %d in conf file - skipped", octstr_get_cstr(field), octstr_get_cstr(grp->name), lineno); else if (dict_put_once(grp->fields, field, octstr_duplicate(value)) == 0) - panic(0, "Duplicate field `%s' at line %d in conf file", + error(0, "Duplicate field `%s' at line %d in conf file, ignored", octstr_get_cstr(field), lineno); } diff --git a/mbuni/mmsbox/mmsbox.c b/mbuni/mmsbox/mmsbox.c index 9208697..9ee8240 100644 --- a/mbuni/mmsbox/mmsbox.c +++ b/mbuni/mmsbox/mmsbox.c @@ -354,9 +354,14 @@ static int fetch_serviceurl(MmsEnvelope *e, http_header_add(rh, "X-Mbuni-Message-ID", octstr_get_cstr(e->msgId)); if (e->fromproxy) http_header_add(rh, "X-Mbuni-MMSC-ID", octstr_get_cstr(e->fromproxy)); - if (e->from) - http_header_add(rh, "X-Mbuni-From", octstr_get_cstr(e->from)); - + if (e->from) { + Octstr *xfrom = octstr_duplicate(e->from); + + _mms_fixup_address(&xfrom, unified_prefix ? octstr_get_cstr(unified_prefix) : NULL, + strip_prefixes, 0); + http_header_add(rh, "X-Mbuni-From", octstr_get_cstr(xfrom)); + octstr_destroy(xfrom); + } if (e->subject) http_header_add(rh, "X-Mbuni-Subject", octstr_get_cstr(e->subject)); @@ -365,8 +370,13 @@ static int fetch_serviceurl(MmsEnvelope *e, for (i = 0, n = gwlist_len(e->to); i < n; i++) { MmsEnvelopeTo *r = gwlist_get(e->to, i); - if (r && r->rcpt) - http_header_add(rh, "X-Mbuni-To", octstr_get_cstr(r->rcpt)); + if (r && r->rcpt) { + Octstr *xto = octstr_duplicate(r->rcpt); + _mms_fixup_address(&xto, unified_prefix ? octstr_get_cstr(unified_prefix) : NULL, + strip_prefixes, 0); + http_header_add(rh, "X-Mbuni-To", octstr_get_cstr(xto)); + octstr_destroy(xto); + } } if ((s = http_header_value(e->hdrs, octstr_imm("X-Mbuni-UAProf"))) != NULL) { /* add UAProf info, if any. */