[Asterisk-code-review] app queue: Handle the caller being redirected out of a queue... (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Fri Mar 10 11:01:10 CST 2017


Richard Mudgett has posted comments on this change. ( https://gerrit.asterisk.org/5149 )

Change subject: app_queue: Handle the caller being redirected out of a queue bridge
......................................................................


Patch Set 2: Code-Review-1

(2 comments)

https://gerrit.asterisk.org/#/c/5149/2/apps/app_queue.c
File apps/app_queue.c:

PS2, Line 5921: 	struct ast_channel_snapshot *caller_snapshot = NULL;
              : 	struct ast_channel_snapshot *member_snapshot = NULL;
Initializing is unnecessary here.  They are initialized in an assignment with the retrieved snapshots later.  I have seen some compilers give a set but not used warning for this though I'm not sure gcc is configured to do this.


PS2, Line 5943: 	ao2_unlock(queue_data);
              : 
              : 	caller_snapshot = ast_channel_snapshot_get_latest(queue_data->caller_uniqueid);
              : 	member_snapshot = ast_channel_snapshot_get_latest(queue_data->member_uniqueid);
You should have left the unlock after the get snapshot calls.  The handle_local_optimization_end() will change the caller_uniqueid or member_uniqueid depending upon which got optimized.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Iba160907770de5a6c9efeffc9df5a13e9ea75334
Gerrit-PatchSet: 2
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Sean Bright <sean.bright at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Sean Bright <sean.bright at gmail.com>
Gerrit-HasComments: Yes



More information about the asterisk-code-review mailing list