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

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

channels/chan_sip.c

index 80300ceb9ee2edb4fa618295c0a42d37c5e6e81f..87244ab2c476e3147a061d8ef1bdaf02c7f30a04 100644 (file)
@@ -3834,20 +3834,8 @@ static void try_suggested_sip_codec(struct sip_pvt *p)
        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);