From 5fcfe061afaeccc361cb89aa72a9da4b80b4f070 Mon Sep 17 00:00:00 2001 From: bagyenda <> Date: Wed, 6 May 2009 05:38:41 +0000 Subject: [PATCH] *** empty log message *** --- mbuni/ChangeLog | 1 + mbuni/doc/examples/mmsc.conf | 1 + mbuni/doc/userguide.shtml | 23 +++++++++++++++++++++++ mbuni/mmlib/mms_cfg.def | 1 + mbuni/mmsc/mmsc_cfg.c | 7 +++++++ mbuni/mmsc/mmsc_cfg.h | 2 +- mbuni/mmsc/mmsmobilesender.c | 2 +- 7 files changed, 35 insertions(+), 2 deletions(-) diff --git a/mbuni/ChangeLog b/mbuni/ChangeLog index 5e569ef..8b1062d 100644 --- a/mbuni/ChangeLog +++ b/mbuni/ChangeLog @@ -1,5 +1,6 @@ 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 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 2002d86..4dbf305 100644 --- a/mbuni/doc/examples/mmsc.conf +++ b/mbuni/doc/examples/mmsc.conf @@ -17,6 +17,7 @@ default-message-expiry = 360000 max-message-expiry = 720000 mmsc-services = Relay,MM1 queue-run-interval = 5 +mm1-queue-run-interval = 300 send-attempt-back-off = 300 sendsms-url = http://localhost:13013/cgi-bin/sendsms sendsms-username = tester diff --git a/mbuni/doc/userguide.shtml b/mbuni/doc/userguide.shtml index e186019..3e1039d 100644 --- a/mbuni/doc/userguide.shtml +++ b/mbuni/doc/userguide.shtml @@ -996,6 +996,29 @@ lists all the configuration directives. The column Mode seconds between each queue run     + + + + + mm1-queue-run-interval + +     + + + MMSC +     + + + + Real +     + + How many + seconds between each queue run for the MM1 queue. Defaults to the +value given above (queue-run-interval) +     + + queue-manager-module diff --git a/mbuni/mmlib/mms_cfg.def b/mbuni/mmlib/mms_cfg.def index cbcf618..4f72cb2 100644 --- a/mbuni/mmlib/mms_cfg.def +++ b/mbuni/mmlib/mms_cfg.def @@ -65,6 +65,7 @@ SINGLE_GROUP(mbuni, OCTSTR(default-message-expiry) OCTSTR(max-message-expiry) OCTSTR(queue-run-interval) + OCTSTR(mm1-queue-run-interval) OCTSTR(send-attempt-back-off) OCTSTR(sendsms-url) OCTSTR(sendsms-username) diff --git a/mbuni/mmsc/mmsc_cfg.c b/mbuni/mmsc/mmsc_cfg.c index e942572..783aeb3 100644 --- a/mbuni/mmsc/mmsc_cfg.c +++ b/mbuni/mmsc/mmsc_cfg.c @@ -213,6 +213,13 @@ MmscSettings *mms_load_mmsc_settings(Octstr *fname, List **proxyrelays, int skip octstr_destroy(s); + + + s = _mms_cfg_getx(cfg, grp, octstr_imm("mm1-queue-run-interval")); + if (!s || (m->mm1_queue_interval = atof(octstr_get_cstr(s))) <= 0) + m->mm1_queue_interval = m->queue_interval; + + octstr_destroy(s); if (mms_cfg_get_int(cfg, grp, octstr_imm("send-attempt-back-off"), &m->send_back_off) == -1) m->send_back_off = BACKOFF_FACTOR; diff --git a/mbuni/mmsc/mmsc_cfg.h b/mbuni/mmsc/mmsc_cfg.h index 2313204..c20d2ba 100644 --- a/mbuni/mmsc/mmsc_cfg.h +++ b/mbuni/mmsc/mmsc_cfg.h @@ -71,7 +71,7 @@ typedef struct MmscSettings { long maxsendattempts; long default_msgexpiry; long max_msgexpiry; - double queue_interval; + double queue_interval, mm1_queue_interval; long send_back_off; long port, mm7port; diff --git a/mbuni/mmsc/mmsmobilesender.c b/mbuni/mmsc/mmsmobilesender.c index 107cf1c..02afcd8 100644 --- a/mbuni/mmsc/mmsmobilesender.c +++ b/mbuni/mmsc/mmsmobilesender.c @@ -413,7 +413,7 @@ static int sendNotify(MmsEnvelope *e) void mbuni_mm1_queue_runner(int *rstop) { settings->qfs->mms_queue_run(octstr_get_cstr(settings->mm1_queuedir), - sendNotify, settings->queue_interval, settings->maxthreads, rstop); + sendNotify, settings->mm1_queue_interval, settings->maxthreads, rstop); gwthread_sleep(2); /* Wait for it to die. */ return; }