From ee5c86878d18c1a55e7a57ceacc44a85da2184d7 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Fri, 11 Apr 2008 07:01:35 +0000 Subject: [PATCH] minor change to mm7/soap parameters --- mbuni/ChangeLog | 3 +++ mbuni/doc/userguide.shtml | 13 +++++++++++++ mbuni/mmlib/mms_cfg.def | 1 + mbuni/mmlib/mms_mm7soap.c | 6 +++--- mbuni/mmsbox/bearerbox.c | 3 ++- mbuni/mmsbox/mmsbox_cfg.c | 1 + mbuni/mmsbox/mmsbox_cfg.h | 2 +- 7 files changed, 24 insertions(+), 5 deletions(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 985267c..81c0642 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,6 @@ +2008-04-11 P. A. Bagyenda + * Added no-sender-address config to mmsc section: Allows you to + * suppress SenderAddress SOAP/XML tag 2008-03-26 P. A. Bagyenda * Minor fix: mmsbox mms-service handling of POST parameters where no % spec given 2008-02-17 P. A. Bagyenda diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index d1d9e88..e832927 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -2454,6 +2454,19 @@ string + + + no-sender-address + + + Boolean + + + If set to true Mbuni will not set + the SenderAddress tag in the SOAP Message Submit XML packet + + + diff --git a/mbuni/mmlib/mms_cfg.def b/mbuni/mmlib/mms_cfg.def index bb3527d..8509026 100644 --- a/mbuni/mmlib/mms_cfg.def +++ b/mbuni/mmlib/mms_cfg.def @@ -147,6 +147,7 @@ MULTI_GROUP(mmsc, OCTSTR(reroute-add-sender-to-subject) OCTSTR(mmsc-library) OCTSTR(custom-settings) + OCTSTR(no-sender-address) ) MULTI_GROUP(mms-service, diff --git a/mbuni/mmlib/mms_mm7soap.c b/mbuni/mmlib/mms_mm7soap.c index d7e55d9..879f309 100644 --- a/mbuni/mmlib/mms_mm7soap.c +++ b/mbuni/mmlib/mms_mm7soap.c @@ -1029,10 +1029,10 @@ MSoapMsg_t *mm7_mmsmsg_to_soap(MmsMsg *msg, Octstr *from, List *xto, switch(mtype) { case MMS_MSGTYPE_SEND_REQ: case MMS_MSGTYPE_RETRIEVE_CONF: - m = mm7_soap_create(isclientside ? MM7_TAG_SubmitReq : MM7_TAG_DeliverReq, - transid); + m = mm7_soap_create(isclientside ? MM7_TAG_SubmitReq : MM7_TAG_DeliverReq, + transid); m->msg = mms_tomime(msg,1); - + strip_non_essential_headers(m->msg); for (i = 0, n = xto ? gwlist_len(xto) : 0; i < n; i++) { /* Add recipients. */ diff --git a/mbuni/mmsbox/bearerbox.c b/mbuni/mmsbox/bearerbox.c index c9e7615..e1d710e 100644 --- a/mbuni/mmsbox/bearerbox.c +++ b/mbuni/mmsbox/bearerbox.c @@ -666,7 +666,8 @@ static Octstr *mm7soap_send(MmscGrp *mmc, Octstr *from, Octstr *to, if (hdrs) distrib = http_header_value(hdrs, octstr_imm("X-Mbuni-DistributionIndicator")); - if ((mreq = mm7_mmsmsg_to_soap(m, from, xto, transid, + if ((mreq = mm7_mmsmsg_to_soap(m, (mmc == NULL || mmc->no_senderaddress == 0) ? from : NULL, + xto, transid, service_code, linkedid, 1, octstr_get_cstr(mmc->id), vasid, NULL, 0,/* UA N/A on this side. */ diff --git a/mbuni/mmsbox/mmsbox_cfg.c b/mbuni/mmsbox/mmsbox_cfg.c index 1480164..582a130 100644 --- a/mbuni/mmsbox/mmsbox_cfg.c +++ b/mbuni/mmsbox/mmsbox_cfg.c @@ -283,6 +283,7 @@ int mms_load_mmsbox_settings(mCfg *cfg, gwthread_func_t *mmsc_handler_func) if (m->reroute_mmsc_id != NULL && m->reroute == 0) warning(0, "MMSBox: reroute-mmsc-id parameter set but reroute=false!"); + mms_cfg_get_bool(x, octstr_imm("no-sender-address"), &m->no_senderaddress); m->mutex = mutex_create(); /* finally start the thingie. */ diff --git a/mbuni/mmsbox/mmsbox_cfg.h b/mbuni/mmsbox/mmsbox_cfg.h index e7907ba..6878676 100644 --- a/mbuni/mmsbox/mmsbox_cfg.h +++ b/mbuni/mmsbox/mmsbox_cfg.h @@ -37,7 +37,7 @@ typedef struct MmscGrp { int reroute; /* whether messages from this mmsc are re-routed outwards. */ Octstr *reroute_mmsc_id; - + int no_senderaddress; /* used by SOAP interface: Don't add a sender address. */ int reroute_mod_subject; /* Set to true if we'll change subject line on reroute. */ MM7Version_t ver; /* supported MM7/SOAP version. */ int use_mt_filter; /* whether to use MT filter on this connection. */