diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 80406f7..270aec4 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2008-08-20 P. A. Bagyenda + * Added default mmsc to send-mms-user (Martin) 2008-08-19 P. A. Bagyenda * Fix for Content-ID header in mmsbox (thanks to Vincent Chavanis ) * Typo fix thanks to Martin Atukunda (matlads@dsmagic.com) diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index d08c4fa..b324dcd 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -2660,6 +2660,18 @@ faked-sender = 100
the VAS gateway by a MMSC for a message submitted by this user. + + + + mmsc + + + string + + + Optional id of the mmsc to use, if none is specified using the CGI Variables + +

diff --git a/mbuni/mmlib/mms_cfg.def b/mbuni/mmlib/mms_cfg.def index 3f6ba81..3d7c85b 100644 --- a/mbuni/mmlib/mms_cfg.def +++ b/mbuni/mmlib/mms_cfg.def @@ -124,6 +124,7 @@ MULTI_GROUP(send-mms-user, OCTSTR(faked-sender) OCTSTR(delivery-report-url) OCTSTR(read-report-url) + OCTSTR(mmsc) ) MULTI_GROUP(mmsc, diff --git a/mbuni/mmsbox/mmsbox.c b/mbuni/mmsbox/mmsbox.c index 0748300..9208697 100644 --- a/mbuni/mmsbox/mmsbox.c +++ b/mbuni/mmsbox/mmsbox.c @@ -1232,7 +1232,9 @@ static void dispatch_sendmms_recv(List *rl) dlr_url = http_cgi_variable(h->cgivars, "dlr-url"); rr_url = http_cgi_variable(h->cgivars, "rr-url"); allow_adaptations = http_cgi_variable(h->cgivars, "allow-adaptations"); - mmc = http_cgi_variable(h->cgivars, "mmsc"); + if ((mmc = http_cgi_variable(h->cgivars, "mmsc")) == NULL) { + mmc = octstr_duplicate(u->mmsc); /* could still be NULL */ + } subject = http_cgi_variable(h->cgivars, "subject"); if ((base_url = http_cgi_variable(h->cgivars, "base-url")) == NULL) diff --git a/mbuni/mmsbox/mmsbox_cfg.c b/mbuni/mmsbox/mmsbox_cfg.c index 3b3559e..461104b 100644 --- a/mbuni/mmsbox/mmsbox_cfg.c +++ b/mbuni/mmsbox/mmsbox_cfg.c @@ -183,6 +183,7 @@ int mms_load_mmsbox_settings(mCfg *cfg, gwthread_func_t *mmsc_handler_func) u->faked_sender = mms_cfg_get(x, octstr_imm("faked-sender")); u->dlr_url = _mms_cfg_getx(x, octstr_imm("delivery-report-url")); u->rr_url = _mms_cfg_getx(x, octstr_imm("read-report-url")); + u->mmsc = mms_cfg_get(x, octstr_imm("mmsc")); gwlist_append(sendmms_users, u); } gwlist_destroy(l, NULL); diff --git a/mbuni/mmsbox/mmsbox_cfg.h b/mbuni/mmsbox/mmsbox_cfg.h index 266c41f..d8416b5 100644 --- a/mbuni/mmsbox/mmsbox_cfg.h +++ b/mbuni/mmsbox/mmsbox_cfg.h @@ -85,7 +85,7 @@ typedef struct MmsService { typedef struct SendMmsUser { Octstr *user, *pass; Octstr *faked_sender; - Octstr *dlr_url, *rr_url; + Octstr *dlr_url, *rr_url, *mmsc; } SendMmsUser; /* Basic settings for the mmsbox. */