From 61ff6817fabe08aaddcfda25f375973d31e6e939 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Fri, 23 Sep 2011 06:27:37 +0000 Subject: [PATCH] MM4_delivery_report.RES handling fix --- mbuni/ChangeLog | 4 +++- mbuni/mmlib/Makefile.am | 4 ++-- mbuni/mmsbox/Makefile.am | 4 ++-- mbuni/mmsc/mmsfromemail.c | 10 ++++++---- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 8d87b9b..a2f2055 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,5 +1,7 @@ +2011-09-23 P. A. Bagyenda + * Fixed handling of received MM4_delivery_report.RES in mmsc code (thanks to Franz Schwartau (franzi at eletromail.org) 2011-09-20 P. A. Bagyenda - * Fix: MM4_Forward.RES should include original msg ID (thanks to Franz Schwartau (franz@eletromail.org) + * Fix: MM4_Forward.RES should include original msg ID (thanks to Franz Schwartau (franz at eletromail.org) 2011-09-08 P. A. Bagyenda * Exposed more functions in lib (get_stripped_param_value) * Minor changes to mms_msg module diff --git a/mbuni/mmlib/Makefile.am b/mbuni/mmlib/Makefile.am index 1eab757..70d4724 100644 --- a/mbuni/mmlib/Makefile.am +++ b/mbuni/mmlib/Makefile.am @@ -1,4 +1,4 @@ -noinst_LIBRARIES = libmms.a -libmms_a_SOURCES = charmibenum.def mms_eventlogger.c mms_mmbox.c mms_msg.c mms_queue.c mms_strings.c mms_uaprof.c mms_util.c mms_mm7soap.c mms_cfg.c +lib_LTLIBRARIES = libmms.la +libmms_la_SOURCES = charmibenum.def mms_eventlogger.c mms_mmbox.c mms_msg.c mms_queue.c mms_strings.c mms_uaprof.c mms_util.c mms_mm7soap.c mms_cfg.c EXTRA_DIST=mms_strings.def mms_eventlogger.h mms_mm7soap.h mms_mmbox.h mms_msg.h mms_queue.h mms_strings.h mms_uaprof.h mms_util.h mms_cfg.h mms_cfg.def mms_cfg-impl.h diff --git a/mbuni/mmsbox/Makefile.am b/mbuni/mmsbox/Makefile.am index 43e9a4f..a6b70b5 100644 --- a/mbuni/mmsbox/Makefile.am +++ b/mbuni/mmsbox/Makefile.am @@ -1,6 +1,6 @@ libmms = $(top_builddir)/mmlib/libmms.a -noinst_LIBRARIES = libmmsbox.a -libmmsbox_a_SOURCES = mmsbox_cdr.c mmsbox_cfg.c dlr.c bearerbox.c mmsbox_resolve.c mmsbox_resolve_shell.c +lib_LTLIBRARIES = libmmsbox.la +libmmsbox_la_SOURCES = mmsbox_cdr.c mmsbox_cfg.c dlr.c bearerbox.c mmsbox_resolve.c mmsbox_resolve_shell.c bin_PROGRAMS = mmsbox mmsbox_SOURCES = mmsbox.c mmsbox_LDADD = libmmsbox.a $(libmms) diff --git a/mbuni/mmsc/mmsfromemail.c b/mbuni/mmsc/mmsfromemail.c index bb2328b..1b77165 100644 --- a/mbuni/mmsc/mmsfromemail.c +++ b/mbuni/mmsc/mmsfromemail.c @@ -219,7 +219,7 @@ int main(int argc, char *argv[]) } } - if (mm4_type == NULL) { /* else assume a normal send message. */ + if (mm4_type == NULL && mtype < 0) { /* else assume a normal send message. */ http_header_add(headers, "X-Mms-Message-Type", "m-send-req"); mm1_type = MMS_MSGTYPE_SEND_REQ; mtype = MM4_FORWARD_REQ; @@ -273,10 +273,12 @@ int main(int argc, char *argv[]) octstr_get_cstr(settings->global_queuedir), mm4_type ? "MM4" : "MM3", settings->host_alias); + + newmsgid = msgid ? octstr_duplicate(msgid) : + qf ? mms_make_msgid(octstr_get_cstr(qf), + settings->host_alias) : NULL; + if (qf) { - newmsgid = msgid ? octstr_duplicate(msgid) : - mms_make_msgid(octstr_get_cstr(qf), - settings->host_alias); mms_info(0, "mmsfromemail", NULL, "%s Queued message to %s from %s (via %s) => %s", mm4_type ? "MM4 Incoming" : "Email2MMS", octstr_get_cstr(xto), octstr_get_cstr(xfrom),