[svn-commits] file: branch 1.2 r41768 - /branches/1.2/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Sep 1 15:49:08 MST 2006


Author: file
Date: Fri Sep  1 17:49:07 2006
New Revision: 41768

URL: http://svn.digium.com/view/asterisk?rev=41768&view=rev
Log:
Only wipe the redirected audio & video IP/port if it's specified, and trigger a reinvite.

Modified:
    branches/1.2/channels/chan_sip.c

Modified: branches/1.2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/channels/chan_sip.c?rev=41768&r1=41767&r2=41768&view=diff
==============================================================================
--- branches/1.2/channels/chan_sip.c (original)
+++ branches/1.2/channels/chan_sip.c Fri Sep  1 17:49:07 2006
@@ -12937,14 +12937,18 @@
 	if (!p) 
 		return -1;
 	ast_mutex_lock(&p->lock);
-	if (rtp)
+	if (rtp) {
 		changed |= ast_rtp_get_peer(rtp, &p->redirip);
-	else
+	} else if (p->redirip.sin_addr.s_addr || ntohs(p->redirip.sin_port) != 0) {
 		memset(&p->redirip, 0, sizeof(p->redirip));
-	if (vrtp)
+		changed = 1;
+	}
+	if (vrtp) {
 		changed |= ast_rtp_get_peer(vrtp, &p->vredirip);
-	else
+	} else if (p->vredirip.sin_addr.s_addr || ntohs(p->vredirip.sin_port) != 0) {
 		memset(&p->vredirip, 0, sizeof(p->vredirip));
+		changed = 1;
+	}
 	if (codecs && (p->redircodecs != codecs)) {
 		p->redircodecs = codecs;
 		changed = 1;



More information about the svn-commits mailing list