From 18cd80e6323f83781b1ca7135dfb7fad63462952 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Thu, 6 Aug 2009 05:13:37 +0000 Subject: [PATCH] *** empty log message *** --- mbuni/ChangeLog | 2 ++ mbuni/mmsbox/bearerbox.c | 9 ++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index bb99885..65d7861 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2009-08-06 P. A. Bagyenda + * Improved handling of email recipients in mmsbox 2009-07-07 P. A. Bagyenda * Updated License for mmsbox mm1 module 2009-07-02 P. A. Bagyenda diff --git a/mbuni/mmsbox/bearerbox.c b/mbuni/mmsbox/bearerbox.c index 24edded..939b749 100644 --- a/mbuni/mmsbox/bearerbox.c +++ b/mbuni/mmsbox/bearerbox.c @@ -1388,7 +1388,8 @@ static int sendMsg(MmsEnvelope *e) MmscGrp *mmc = NULL; Octstr *new_msgid = NULL; List *errl = NULL; - + int is_email = 0; + if (!to || !to->process) continue; @@ -1407,7 +1408,9 @@ static int sendMsg(MmsEnvelope *e) goto done; } - if ((mmc = get_handler_mmc(e->viaproxy, to->rcpt, e->from)) == NULL) { + is_email = (octstr_search_char(to->rcpt, '@', 0) > 0); + + if ((mmc = get_handler_mmc(e->viaproxy, to->rcpt, e->from)) == NULL && !is_email) { err = octstr_format("MMSBox error: Failed to deliver to " "%S. Don't know how to route!", to->rcpt); @@ -1415,7 +1418,7 @@ static int sendMsg(MmsEnvelope *e) goto done; } - if (octstr_search_char(to->rcpt, '@', 0) > 0) { + if (is_email) { int j = octstr_case_search(e->from, octstr_imm("/TYPE=PLMN"), 0); int k = octstr_case_search(e->from, octstr_imm("/TYPE=IPv"), 0); int len = octstr_len(e->from);