[asterisk-commits] file: branch 1.2 r73315 - /branches/1.2/apps/app_queue.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Jul 5 08:19:17 CDT 2007


Author: file
Date: Thu Jul  5 08:19:17 2007
New Revision: 73315

URL: http://svn.digium.com/view/asterisk?view=rev&rev=73315
Log:
Reset ServicelevelPerf variable back to 0 if we are unable to calculate it each time... otherwise we will get previous values. (issue #10117 reported by noriyuki)

Modified:
    branches/1.2/apps/app_queue.c

Modified: branches/1.2/apps/app_queue.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/apps/app_queue.c?view=diff&rev=73315&r1=73314&r2=73315
==============================================================================
--- branches/1.2/apps/app_queue.c (original)
+++ branches/1.2/apps/app_queue.c Thu Jul  5 08:19:17 2007
@@ -3627,8 +3627,7 @@
 
 		/* List queue properties */
 		if (ast_strlen_zero(queuefilter) || !strcmp(q->name, queuefilter)) {
-			if(q->callscompleted > 0)
-				sl = 100*((float)q->callscompletedinsl/(float)q->callscompleted);
+			sl = ((q->callscompleted > 0) ? 100*((float)q->callscompletedinsl/(float)q->callscompleted) : 0);
 			ast_cli(s->fd, "Event: QueueParams\r\n"
 						"Queue: %s\r\n"
 						"Max: %d\r\n"




More information about the asterisk-commits mailing list