From 3d663b90a91a398fbb519b5960ba01a5f760d3ca Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Wed, 6 May 2009 07:51:53 +0000 Subject: [PATCH] *** empty log message *** --- mbuni/ChangeLog | 2 ++ mbuni/doc/examples/mmsc.conf | 1 + mbuni/doc/userguide.shtml | 24 ++++++++++++++++++++++++ mbuni/mmlib/mms_cfg.def | 1 + mbuni/mmsc/mmsc_cfg.c | 3 +++ mbuni/mmsc/mmsc_cfg.h | 2 +- mbuni/mmsc/mmsmobilesender.c | 2 +- 7 files changed, 33 insertions(+), 2 deletions(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index a6eb971..c3e3bfa 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -2,6 +2,8 @@ * 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 * Fixed: When MM1 notification attempts exceed maximum, do not delete message, rather wait for expiry + * Added mm1-maximum-notify-attempts config option, so that number of MM1 notifications can be controlled + separately from other delivery attempts 2009-03-28 P. A. Bagyenda * Improved pgsql-queue module: re-connect to db if connections die, only allocate as many connections as needed 2009-03-05 P. A. Bagyenda diff --git a/mbuni/doc/examples/mmsc.conf b/mbuni/doc/examples/mmsc.conf index 4dbf305..0a77a4f 100644 --- a/mbuni/doc/examples/mmsc.conf +++ b/mbuni/doc/examples/mmsc.conf @@ -13,6 +13,7 @@ max-send-threads = 5 send-mail-prog = /usr/sbin/sendmail -f '%f' '%t' unified-prefix = "+25637,037,37" maximum-send-attempts = 50 +mm1-maximum-notify-attempts = 1 default-message-expiry = 360000 max-message-expiry = 720000 mmsc-services = Relay,MM1 diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index 3e1039d..9fd2c74 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -936,6 +936,30 @@ lists all the configuration directives. The column Mode     + + + + + mm1-maximum-notify-attempts + +     + + + MMSC +     + + + + integer +     + + Maximum number + of attempts gateway must make to notify a device of a pending + message on the MM1 interface, before giving up. Defaults to maximum-send-attempts +     + + + default-message-expiry diff --git a/mbuni/mmlib/mms_cfg.def b/mbuni/mmlib/mms_cfg.def index 4f72cb2..99d1137 100644 --- a/mbuni/mmlib/mms_cfg.def +++ b/mbuni/mmlib/mms_cfg.def @@ -62,6 +62,7 @@ SINGLE_GROUP(mbuni, OCTSTR(unified-prefix) OCTSTR(strip-prefixes) OCTSTR(maximum-send-attempts) + OCTSTR(mm1-maximum-notify-attempts) OCTSTR(default-message-expiry) OCTSTR(max-message-expiry) OCTSTR(queue-run-interval) diff --git a/mbuni/mmsc/mmsc_cfg.c b/mbuni/mmsc/mmsc_cfg.c index 783aeb3..14e88b6 100644 --- a/mbuni/mmsc/mmsc_cfg.c +++ b/mbuni/mmsc/mmsc_cfg.c @@ -201,6 +201,9 @@ MmscSettings *mms_load_mmsc_settings(Octstr *fname, List **proxyrelays, int skip if (mms_cfg_get_int(cfg, grp, octstr_imm("maximum-send-attempts"), &m->maxsendattempts) == -1) m->maxsendattempts = MAXQTRIES; + if (mms_cfg_get_int(cfg, grp, octstr_imm("mm1-maximum-notify-attempts"), &m->mm1_maxsendattempts) == -1) + m->mm1_maxsendattempts = m->maxsendattempts; + if (mms_cfg_get_int(cfg, grp, octstr_imm("default-message-expiry"), &m->default_msgexpiry) == -1) m->default_msgexpiry = DEFAULT_EXPIRE; diff --git a/mbuni/mmsc/mmsc_cfg.h b/mbuni/mmsc/mmsc_cfg.h index c20d2ba..5ee6285 100644 --- a/mbuni/mmsc/mmsc_cfg.h +++ b/mbuni/mmsc/mmsc_cfg.h @@ -68,7 +68,7 @@ typedef struct MmscSettings { Octstr *ua_profile_cache_dir; long maxthreads; - long maxsendattempts; + long maxsendattempts, mm1_maxsendattempts; long default_msgexpiry; long max_msgexpiry; double queue_interval, mm1_queue_interval; diff --git a/mbuni/mmsc/mmsmobilesender.c b/mbuni/mmsc/mmsmobilesender.c index 898db9f..accc71c 100644 --- a/mbuni/mmsc/mmsmobilesender.c +++ b/mbuni/mmsc/mmsmobilesender.c @@ -180,7 +180,7 @@ static int sendNotify(MmsEnvelope *e) prov_notify_event = "failedfetch"; rtype = "Expired"; goto done; - } else if (e->attempts >= settings->maxsendattempts) { + } else if (e->attempts >= settings->mm1_maxsendattempts) { err = octstr_format("MM1: Maximum delivery attempts [%d] to %S reached. Delivery suspended!", e->attempts, to); res = MMS_SEND_OK;