diff options
author | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-10 15:53:52 +0000 |
---|---|---|
committer | mnicholson <mnicholson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-11-10 15:53:52 +0000 |
commit | 9fb84e9fcbd036fa73d74e23a1d533e745125e37 (patch) | |
tree | 62cceff99253d44429a0bb096d2020349782f84c /channels/chan_sip.c | |
parent | 793d179b077a7c754502a716ed53f55858e05990 (diff) |
Reverted revision 201717.
(closes issue 0016175)
Reported by: paul-tg
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@229102 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 6850f833b..4103fa52f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -6468,14 +6468,6 @@ static void try_suggested_sip_codec(struct sip_pvt *p) { format_t fmt; const char *codec; - struct ast_channel* chan; - - chan = ast_channel_ref(p->owner); - while (ast_channel_trylock(chan)) { - sip_pvt_unlock(p); - sched_yield(); - sip_pvt_lock(p); - } if (p->outgoing_call) { codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC_OUTBOUND"); @@ -6483,12 +6475,7 @@ static void try_suggested_sip_codec(struct sip_pvt *p) codec = pbx_builtin_getvar_helper(p->owner, "SIP_CODEC"); } - codec = ast_strdupa(S_OR(codec, "")); - - ast_channel_unlock(chan); - chan = ast_channel_unref(chan); - - if (ast_strlen_zero(codec)) + if (!codec) return; fmt = ast_getformatbyname(codec); |