[Asterisk-code-review] app_queue: Fix leave-empty not recording a call as abandoned (asterisk[16])

Kevin Harwell asteriskteam at digium.com
Mon Aug 31 17:15:34 CDT 2020


Kevin Harwell has posted comments on this change. ( https://gerrit.asterisk.org/c/asterisk/+/14811 )

Change subject: app_queue: Fix leave-empty not recording a call as abandoned
......................................................................


Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.asterisk.org/c/asterisk/+/14811/2/apps/app_queue.c 
File apps/app_queue.c:

https://gerrit.asterisk.org/c/asterisk/+/14811/2/apps/app_queue.c@5646 
PS2, Line 5646: 			if ((status = get_member_status(qe->parent, qe->max_penalty, qe->min_penalty, qe->raise_penalty, qe->parent->leavewhenempty, 0))) {
              : 				record_abandoned(qe);
              : 				*reason = QUEUE_LEAVEEMPTY;
              : 				ast_queue_log(qe->parent->name, ast_channel_uniqueid(qe->chan), "NONE", "EXITEMPTY", "%d|%d|%ld", qe->pos, qe->opos, (long) (time(NULL) - qe->start));
              : 				res = -1;
              : 				qe->handled = -1;
              : 				
I feel like adding a call to record_abandoned here is not the "most" correct although technically it works. The caller hasn't "abandoned" the call quite at this point. Abandoned checks and processing take place later. I think the more correct solution is setting qe->handled = 0 since the call has not been actually handled (which would be expected). What happens if you do that instead?



-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/14811
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: I1a71b81df78adff59af587f1d8483cf57df430c7
Gerrit-Change-Number: 14811
Gerrit-PatchSet: 2
Gerrit-Owner: Kfir Itzhak <mastertheknife at gmail.com>
Gerrit-Reviewer: Benjamin Keith Ford <bford at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Comment-Date: Mon, 31 Aug 2020 22:15:34 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20200831/13b9ffdc/attachment.html>


More information about the asterisk-code-review mailing list