summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorMark Michelson <mmichelson@digium.com>2007-11-29 19:39:31 +0000
committerMark Michelson <mmichelson@digium.com>2007-11-29 19:39:31 +0000
commit4ed5336a45ad3f4202ad1fe39fbe4210f60d0841 (patch)
tree6bab33d851110d5255d7569e91f6ea2bb8105e63 /apps
parenta31a852dbc49f408ec9c682499e8af2ccbc563f6 (diff)
Merged revisions 90163 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90163 | mmichelson | 2007-11-29 13:38:39 -0600 (Thu, 29 Nov 2007) | 6 lines This patch handles the case where a queue member with a negative penalty is added via the manager. If a negative value is submitted for a member penalty, we set it to 0. (closes issue #11411, reported and patched by Laureano) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@90164 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_queue.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 274ae3001..907fdaddd 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4999,7 +4999,7 @@ static int manager_add_queue_member(struct mansession *s, const struct message *
if (ast_strlen_zero(penalty_s))
penalty = 0;
- else if (sscanf(penalty_s, "%d", &penalty) != 1)
+ else if (sscanf(penalty_s, "%d", &penalty) != 1 || penalty < 0)
penalty = 0;
if (ast_strlen_zero(paused_s))