aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-29 19:38:39 +0000
committermmichelson <mmichelson@f38db490-d61c-443f-a65b-d21fe96a405b>2007-11-29 19:38:39 +0000
commit4630de5119cd3738503516faab0a36c73c1c9f79 (patch)
tree61d22c5e7baa12427419351b855d4effdc05c4e9
parent6cd13b68df9bd785d32052aa36c1ee4a0d73ff1f (diff)
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: http://svn.digium.com/svn/asterisk/branches/1.4@90163 f38db490-d61c-443f-a65b-d21fe96a405b
-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 de06df861..da99ab0a3 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -4381,7 +4381,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))