[Asterisk-cvs] asterisk rtp.c,1.45,1.46

martinp at lists.digium.com martinp at lists.digium.com
Tue Nov 25 09:59:53 CST 2003


Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv24643

Modified Files:
	rtp.c 
Log Message:
Warn about not being able to do reinvite in the right place and unlock the mutexes before returning


Index: rtp.c
===================================================================
RCS file: /usr/cvsroot/asterisk/rtp.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- rtp.c	18 Nov 2003 00:45:04 -0000	1.45
+++ rtp.c	25 Nov 2003 16:26:15 -0000	1.46
@@ -1199,10 +1199,13 @@
 		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);




More information about the svn-commits mailing list