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

Richard Mudgett asteriskteam at digium.com
Thu Mar 9 15:38:53 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 1:

(1 comment)

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

Line 5928: 	if (ast_strlen_zero(queue_data->bridge_uniqueid)) {
> And if all ao2_lock() is doing under the hook is calling pthread_mutex_lock
yes.  The string fields especially would need the protection.

I think only the bridge_uniqueid, caller_uniqueid, and member_uniqueid really need the protection as they can change and are used by the bridge_router and channel_router stasis members and potentially processed by different threads.

The caller_optimize and member_optimize can change but don't really need protection because they are only used inside the registered channel stasis message optimization handlers which is one thread.

The dying flag member can change and is set from zero to non-zero by two different stasis router threads so protection might a good thing.  Further analysis would be needed to see if you actually need to hold the lock for the entire routine or if remove_stasis_subscriptions() simply needs to recheck dying before actually unsubscribing.


-- 
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: 1
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