[asterisk-commits] file: branch 11 r373880 - in /branches/11: ./ channels/chan_local.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Sep 27 06:33:09 CDT 2012
Author: file
Date: Thu Sep 27 06:33:03 2012
New Revision: 373880
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=373880
Log:
Fix an issue where Local channels dialed by app_queue are considered in use immediately.
The chan_local channel driver returns a device state of in use even if a created Local
channel has not yet been dialed. This fix changes the logic to return a state of not
in use until the channel itself has been dialed.
(closes issue ASTERISK-20390)
Reported by: tim_ringenbach
Review: https://reviewboard.asterisk.org/r/2116/
........
Merged revisions 373878 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
Merged revisions 373879 from http://svn.asterisk.org/svn/asterisk/branches/10
Modified:
branches/11/ (props changed)
branches/11/channels/chan_local.c
Propchange: branches/11/
------------------------------------------------------------------------------
Binary property 'branch-10-merged' - no diff available.
Modified: branches/11/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/branches/11/channels/chan_local.c?view=diff&rev=373880&r1=373879&r2=373880
==============================================================================
--- branches/11/channels/chan_local.c (original)
+++ branches/11/channels/chan_local.c Thu Sep 27 06:33:03 2012
@@ -311,11 +311,13 @@
res = AST_DEVICE_NOT_INUSE;
it = ao2_iterator_init(locals, 0);
- while ((lp = ao2_iterator_next(&it))) {
+ while ((lp = ao2_iterator_next(&it)) && (res == AST_DEVICE_NOT_INUSE)) {
if (!strcmp(exten, lp->exten) && !strcmp(context, lp->context) && lp->owner) {
- res = AST_DEVICE_INUSE;
- ao2_ref(lp, -1);
- break;
+ ao2_lock(lp);
+ if (ast_test_flag(lp, LOCAL_LAUNCHED_PBX)) {
+ res = AST_DEVICE_INUSE;
+ }
+ ao2_unlock(lp);
}
ao2_ref(lp, -1);
}
More information about the asterisk-commits
mailing list