[svn-commits] mmichelson: branch 1.4 r90163 - /branches/1.4/apps/app_queue.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Nov 29 13:38:39 CST 2007


Author: mmichelson
Date: Thu Nov 29 13:38:39 2007
New Revision: 90163

URL: http://svn.digium.com/view/asterisk?view=rev&rev=90163
Log:
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)


Modified:
    branches/1.4/apps/app_queue.c

Modified: branches/1.4/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/apps/app_queue.c?view=diff&rev=90163&r1=90162&r2=90163
==============================================================================
--- branches/1.4/apps/app_queue.c (original)
+++ branches/1.4/apps/app_queue.c Thu Nov 29 13:38:39 2007
@@ -4381,7 +4381,7 @@
 
 	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))




More information about the svn-commits mailing list