aboutsummaryrefslogtreecommitdiffstats
path: root/rtp.c
diff options
context:
space:
mode:
authormartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-11-25 16:26:15 +0000
committermartinp <martinp@f38db490-d61c-443f-a65b-d21fe96a405b>2003-11-25 16:26:15 +0000
commitfecb6a8517c5840541943b8e6d07d13baee426bd (patch)
treea3265a0d10ae0cd7ea98dc44f77d37c4f3dd0ead /rtp.c
parentb83fd1464a221c59792a6724f87a6a636863a309 (diff)
Warn about not being able to do reinvite in the right place and unlock the mutexes before returning
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1793 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'rtp.c')
-rwxr-xr-xrtp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rtp.c b/rtp.c
index 82a1cd5f6..92fddcafe 100755
--- a/rtp.c
+++ b/rtp.c
@@ -1199,10 +1199,13 @@ int ast_rtp_bridge(struct ast_channel *c0, struct ast_channel *c1, int flags, st
int codec0,codec1;
codec0 = pr0->get_codec(c0);
codec1 = pr1->get_codec(c1);
- ast_log(LOG_WARNING, "codec0 = %d is not codec1 = %d, can't do reinvite\n",codec0,codec1);
/* Hey, we can't do reinvite if both parties speak diffrent codecs */
- if (codec0 != codec1)
+ if (codec0 != codec1) {
+ ast_log(LOG_WARNING, "codec0 = %d is not codec1 = %d, can't do reinvite\n",codec0,codec1);
+ ast_mutex_unlock(&c0->lock);
+ ast_mutex_unlock(&c1->lock);
return -2;
+ }
}
if (pr0->set_rtp_peer(c0, p1, vp1))
ast_log(LOG_WARNING, "Channel '%s' failed to talk to '%s'\n", c0->name, c1->name);