aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-14 18:08:54 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-14 18:08:54 +0000
commit589c4d6e3817269e094b9c37b0a52362f028a67b (patch)
treefc89935e00743f7d8bdfa15136d247211c31d398 /apps
parent4a35a179c434b7cc0e68c38462ef707237a8e4c3 (diff)
Don't allow rounding seconds to weird values that may cause "unexpected" results.
Issue 9514. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@64263 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index b46584893..88a212931 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -859,7 +859,9 @@ static void queue_set_param(struct call_queue *q, const char *param, const char
ast_log(LOG_DEBUG, "%s=%s for queue '%s'\n", param, val, q->name);
} else if (!strcasecmp(param, "announce-round-seconds")) {
q->roundingseconds = atoi(val);
- if (q->roundingseconds>60 || q->roundingseconds<0) {
+ /* Rounding to any other values just doesn't make sense... */
+ if (!(q->roundingseconds == 0 || q->roundingseconds == 1 || q->roundingseconds == 5 || q->roundingseconds == 10
+ || q->roundingseconds == 15 || q->roundingseconds == 20 || q->roundingseconds == 30)) {
if (linenum >= 0) {
ast_log(LOG_WARNING, "'%s' isn't a valid value for %s "
"using 0 instead for queue '%s' at line %d of queues.conf\n",