diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-10 15:22:13 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-10 15:22:13 +0000 |
commit | 4c8dfd3d17e2bcb46785b28bf1b30a7f1cedbc8c (patch) | |
tree | 0162eb77f0f84ea4057343e3890df7dd62aa7dbe /channels | |
parent | 74bedc844b10ab114d82b728cb00c8448b0bed12 (diff) |
Reverted revision 202022.
(closes issue #16175)
Reported by: paul-tg
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@229091 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 80300ceb9..87244ab2c 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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); |