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

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


Author: irroot
Date: Tue Sep 27 04:48:05 2011
New Revision: 338031

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

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=338031&r1=338030&r2=338031
==============================================================================
--- 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:48:05 2011
@@ -607,9 +607,10 @@
 	} else if (f && (f->frametype == AST_FRAME_VOICE)) {
 		/* fixup audio formats nativeformat has changed we must adjust
 		 * ast is p->owner and is locked here*/
+		ao2_unlock(p);
 		bridge = ast_bridged_channel(ast);
 		if (bridge && !(bridge->nativeformats & ast->nativeformats)) {
-			while (lockcheck && ast_channel_trylock(p->chan)) {
+			while (lockcheck && p->chan && ast_channel_trylock(p->chan)) {
 				lockcheck--;
 				usleep(1000);
 			}
@@ -623,6 +624,7 @@
 				ast_channel_unlock(p->chan);
 			}
 		}
+		ao2_lock(p);
 	}
 
 	if (!ast_test_flag(p, LOCAL_ALREADY_MASQED)) {




More information about the asterisk-commits mailing list