From: Joshua Colp Date: Thu, 5 Jul 2007 13:19:17 +0000 (+0000) Subject: Reset ServicelevelPerf variable back to 0 if we are unable to calculate it each time... X-Git-Tag: 1.2.21~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bf7b174b08b6a869195314a32a8068cc280f9a4d;p=thirdparty%2Fasterisk.git 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) git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@73315 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/apps/app_queue.c b/apps/app_queue.c index 730c1153f1..cedf9983e3 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -3627,8 +3627,7 @@ static int manager_queues_status( struct mansession *s, struct message *m ) /* 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"