Skip to content
Snippets Groups Projects
Commit 66d2f2de authored by Martin Pycko's avatar Martin Pycko
Browse files

Warn about not being able to do reinvite in the right place and unlock the mutexes before returning

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1793 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 8b7dd019
Branches
Tags
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment