diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-10 15:38:20 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-10 15:38:20 +0000 |
commit | 5aa2a537b06cfddc278e300a6fc083477fa439a0 (patch) | |
tree | 46d0850da110ceaaa6bb1b432afb0e44ec1c85bd | |
parent | 9aab01f01841fff6e5f463a237d7ffa6e4b05eea (diff) |
Reverted revision 202008.
(closes issue #16175)
Reported by: paul-tg
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.1@229099 f38db490-d61c-443f-a65b-d21fe96a405b
-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 cdcab1985..d778db807 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -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); |