[Asterisk-code-review] app queue: fix function (asterisk[13])

scgm11 asteriskteam at digium.com
Sun Nov 6 07:25:56 CST 2016


scgm11 has uploaded a new change for review. ( https://gerrit.asterisk.org/4326 )

Change subject: app_queue: fix function
......................................................................

app_queue: fix function

Change-Id: Ie442c810e205950750e373d6bb9b257e44b9f533
---
M apps/app_queue.c
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/26/4326/1

diff --git a/apps/app_queue.c b/apps/app_queue.c
index 8bdc6dd..04d0029 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -2735,7 +2735,6 @@
 	q->callscompleted = 0;
 	q->callsabandoned = 0;
 	q->callscompletedinsl = 0;
-	q->callsabandonedinsl = 0;
 	q->talktime = 0;
 
 	if (q->members) {
@@ -4594,6 +4593,9 @@
 /*! \brief Record that a caller gave up on waiting in queue */
 static void record_abandoned(struct queue_ent *qe)
 {
+	int callabandonedinsl = 0;
+	time_t now;
+
 	RAII_VAR(struct ast_json *, blob, NULL, ast_json_unref);
 
 	set_queue_variables(qe->parent, qe->chan);
@@ -4604,9 +4606,9 @@
 			     "OriginalPosition", qe->opos,
 			     "HoldTime", (int)(time(NULL) - qe->start));
 
-	time_t now;
+
 	time(&now);
-	int callabandonedinsl = ((now - qe->start) <= qe->parent->servicelevel);
+	callabandonedinsl = ((now - qe->start) <= qe->parent->servicelevel);
 	if(callabandonedinsl)
 		qe->parent->callsabandonedinsl++;
 

-- 
To view, visit https://gerrit.asterisk.org/4326
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie442c810e205950750e373d6bb9b257e44b9f533
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: scgm11 <scgm11 at gmail.com>



More information about the asterisk-code-review mailing list