[asterisk-commits] irroot: branch irroot/distrotech-customers-1.8 r338032 - /team/irroot/distrot...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 27 04:59:44 CDT 2011


Author: irroot
Date: Tue Sep 27 04:59:40 2011
New Revision: 338032

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=338032
Log:
chan_local fixup pvt must be unlocked as per dvosel take 2

Modified:
    team/irroot/distrotech-customers-1.8/channels/chan_local.c

Modified: team/irroot/distrotech-customers-1.8/channels/chan_local.c
URL: http://svnview.digium.com/svn/asterisk/team/irroot/distrotech-customers-1.8/channels/chan_local.c?view=diff&rev=338032&r1=338031&r2=338032
==============================================================================
--- team/irroot/distrotech-customers-1.8/channels/chan_local.c (original)
+++ team/irroot/distrotech-customers-1.8/channels/chan_local.c Tue Sep 27 04:59:40 2011
@@ -609,10 +609,13 @@
 		 * ast is p->owner and is locked here*/
 		ao2_unlock(p);
 		bridge = ast_bridged_channel(ast);
+		ao2_lock(p);
 		if (bridge && !(bridge->nativeformats & ast->nativeformats)) {
 			while (lockcheck && p->chan && ast_channel_trylock(p->chan)) {
 				lockcheck--;
+				ao2_unlock(p);
 				usleep(1000);
+				ao2_lock(p);
 			}
 			if (lockcheck) {
 				ast->nativeformats = bridge->nativeformats;
@@ -624,7 +627,6 @@
 				ast_channel_unlock(p->chan);
 			}
 		}
-		ao2_lock(p);
 	}
 
 	if (!ast_test_flag(p, LOCAL_ALREADY_MASQED)) {




More information about the asterisk-commits mailing list