From 0ee33f2da10a96aa8960623183e7c31b14a6e2b4 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Tue, 12 May 2009 05:57:47 +0000 Subject: [PATCH] *** empty log message *** --- mbuni/ChangeLog | 2 ++ mbuni/doc/userguide.shtml | 22 ++++++++++++++++++++++ mbuni/mmlib/mms_cfg.def | 1 + mbuni/mmsbox/bearerbox.c | 4 ++-- mbuni/mmsbox/mmsbox.c | 4 ++-- mbuni/mmsbox/mmsbox_cfg.c | 10 +++++++--- mbuni/mmsbox/mmsbox_cfg.h | 2 +- 7 files changed, 37 insertions(+), 8 deletions(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index c3e3bfa..5db7cfa 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,3 +1,5 @@ +2009-05-05 P. A. Bagyenda + * added mmsbox-maximum-request-attempts config param 2009-05-05 P. A. Bagyenda * MMSC fix: don't send subject in notification if size optimisation turned on * Added mm1-queue-run-interval config option, so that MM1 queue can be processed at different interval diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index 9fd2c74..04739f1 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -958,6 +958,28 @@ lists all the configuration directives. The column Mode message on the MM1 interface, before giving up. Defaults to maximum-send-attempts     + + + + mmsbox-maximum-request-attempts + +     + + + VAS GW +     + + + + integer +     + + Maximum number + of attempts VAS Gateway must make to fetich a MMS service URL before + giving up. Defaults to maximum-send-attempts +     + + diff --git a/mbuni/mmlib/mms_cfg.def b/mbuni/mmlib/mms_cfg.def index 99d1137..96909b7 100644 --- a/mbuni/mmlib/mms_cfg.def +++ b/mbuni/mmlib/mms_cfg.def @@ -63,6 +63,7 @@ SINGLE_GROUP(mbuni, OCTSTR(strip-prefixes) OCTSTR(maximum-send-attempts) OCTSTR(mm1-maximum-notify-attempts) + OCTSTR(mmsbox-maximum-request-attempts) OCTSTR(default-message-expiry) OCTSTR(max-message-expiry) OCTSTR(queue-run-interval) diff --git a/mbuni/mmsbox/bearerbox.c b/mbuni/mmsbox/bearerbox.c index d2f5657..e1f1c35 100644 --- a/mbuni/mmsbox/bearerbox.c +++ b/mbuni/mmsbox/bearerbox.c @@ -1397,11 +1397,11 @@ static int sendMsg(MmsEnvelope *e) res = MMS_SEND_ERROR_FATAL; goto done; - } else if (e->attempts >= mmsbox_maxsendattempts) { + } else if (e->attempts >= maxsendattempts) { err = octstr_format("MMSBox error: Failed to deliver to " "%S after %ld attempts. (max attempts allowed is %ld)!", to->rcpt, e->attempts, - mmsbox_maxsendattempts); + maxsendattempts); res = MMS_SEND_ERROR_FATAL; goto done; } diff --git a/mbuni/mmsbox/mmsbox.c b/mbuni/mmsbox/mmsbox.c index 250c601..60ce7ea 100644 --- a/mbuni/mmsbox/mmsbox.c +++ b/mbuni/mmsbox/mmsbox.c @@ -596,11 +596,11 @@ static int mmsbox_service_dispatch(MmsEnvelope *e) res = -1; goto done; - } else if (e->attempts >= mmsbox_maxsendattempts) { + } else if (e->attempts >= svc_maxsendattempts) { err = octstr_format("Failed to deliver [msgid=%S,mmc_id=%S] " "after %ld attempts. (max attempts allowed is %ld)!", e->msgId, e->fromproxy, e->attempts, - mmsbox_maxsendattempts); + svc_maxsendattempts); res = -1; goto done; } diff --git a/mbuni/mmsbox/mmsbox_cfg.c b/mbuni/mmsbox/mmsbox_cfg.c index c2a7276..f9a08fb 100644 --- a/mbuni/mmsbox/mmsbox_cfg.c +++ b/mbuni/mmsbox/mmsbox_cfg.c @@ -29,7 +29,7 @@ List *sendmms_users = NULL; /* list of SendMmsUser structs */ List *mms_services = NULL; /* list of MMS Services */ Octstr *incoming_qdir, *outgoing_qdir, *dlr_dir; -long mmsbox_maxsendattempts, mmsbox_send_back_off, default_msgexpiry, max_msgexpiry = -1; +long svc_maxsendattempts, maxsendattempts, mmsbox_send_back_off, default_msgexpiry, max_msgexpiry = -1; long maxthreads = 0; double queue_interval = -1; Octstr *unified_prefix = NULL; @@ -108,8 +108,12 @@ int mms_load_mmsbox_settings(Octstr *fname, gwthread_func_t *mmsc_handler_func) } if (mms_cfg_get_int(cfg, grp, - octstr_imm("maximum-send-attempts"), &mmsbox_maxsendattempts) < 0) - mmsbox_maxsendattempts = MAXQTRIES; + octstr_imm("maximum-send-attempts"), &maxsendattempts) < 0) + maxsendattempts = MAXQTRIES; + + if (mms_cfg_get_int(cfg, grp, + octstr_imm("mmsbox-maximum-request-attempts"), &svc_maxsendattempts) < 0) + svc_maxsendattempts = maxsendattempts; if (mms_cfg_get_int(cfg, grp, octstr_imm("send-attempt-back-off"), &mmsbox_send_back_off) == -1) diff --git a/mbuni/mmsbox/mmsbox_cfg.h b/mbuni/mmsbox/mmsbox_cfg.h index ab94f67..77c1300 100644 --- a/mbuni/mmsbox/mmsbox_cfg.h +++ b/mbuni/mmsbox/mmsbox_cfg.h @@ -126,7 +126,7 @@ extern Octstr *unified_prefix; extern Octstr *sendmail_cmd; extern Octstr *myhostname; extern List *strip_prefixes; -extern long mmsbox_maxsendattempts, mmsbox_send_back_off, default_msgexpiry, max_msgexpiry; +extern long svc_maxsendattempts, maxsendattempts, mmsbox_send_back_off, default_msgexpiry, max_msgexpiry; extern long maxthreads; extern double queue_interval; extern struct SendMmsPortInfo {