Reverted revision 202006.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@229100 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Matthew Nicholson
2009-11-10 15:41:46 +00:00
parent 250e08a2d8
commit 4eadd117e6

View File

@@ -5270,20 +5270,8 @@ static void try_suggested_sip_codec(struct sip_pvt *p)
int fmt; int fmt;
const char *codec; const char *codec;
while (p->owner && ast_channel_trylock(p->owner)) { codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC");
sip_pvt_unlock(p); if (!codec)
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))
return; return;
fmt = ast_getformatbyname(codec); fmt = ast_getformatbyname(codec);