[asterisk-commits] mnicholson: branch 1.4 r229091 - /branches/1.4/channels/chan_sip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 10 09:22:18 CST 2009


Author: mnicholson
Date: Tue Nov 10 09:22:13 2009
New Revision: 229091

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=229091
Log:
Reverted revision 202022.

(closes issue #16175)
Reported by: paul-tg

Modified:
    branches/1.4/channels/chan_sip.c

Modified: branches/1.4/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.4/channels/chan_sip.c?view=diff&rev=229091&r1=229090&r2=229091
==============================================================================
--- branches/1.4/channels/chan_sip.c (original)
+++ branches/1.4/channels/chan_sip.c Tue Nov 10 09:22:13 2009
@@ -3834,20 +3834,8 @@
 	int fmt;
 	const char *codec;
 
-	while (p->owner && ast_channel_trylock(p->owner)) {
-		ast_mutex_unlock(&p->lock);
-		sched_yield();
-		ast_mutex_lock(&p->lock);
-	}
-
-	if (!p->owner)
-		return;
-
-	codec = ast_strdupa(S_OR(pbx_builtin_getvar_helper(p->owner, "SIP_CODEC"), ""));
-
-	ast_channel_unlock(p->owner);
-
-	if (ast_strlen_zero(codec))
+	codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC");
+	if (!codec) 
 		return;
 
 	fmt = ast_getformatbyname(codec);




More information about the asterisk-commits mailing list