]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Reverted revision 202008.
authorMatthew Nicholson <mnicholson@digium.com>
Tue, 10 Nov 2009 15:38:20 +0000 (15:38 +0000)
committerMatthew Nicholson <mnicholson@digium.com>
Tue, 10 Nov 2009 15:38:20 +0000 (15:38 +0000)
(closes issue #16175)
Reported by: paul-tg

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@229099 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index cdcab1985416b36d76a977c83126f3442ef7764a..d778db8072fc727128681e339cdfddae6f6c06e3 100644 (file)
@@ -5740,20 +5740,8 @@ static void try_suggested_sip_codec(struct sip_pvt *p)
        int fmt;
        const char *codec;
 
-       while (p->owner && ast_channel_trylock(p->owner)) {
-               sip_pvt_unlock(p);
-               sched_yield();
-               sip_pvt_lock(p);
-       }
-
-       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);