[Asterisk-cvs] asterisk/channels chan_sip.c,1.796,1.797

markster at lists.digium.com markster at lists.digium.com
Thu Jul 28 14:17:39 CDT 2005


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

Modified Files:
	chan_sip.c 
Log Message:
Don't delete RTP if there is a channel, even if we get REGISTER/SUBSCRIBE (bug #4534)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.796
retrieving revision 1.797
diff -u -d -r1.796 -r1.797
--- chan_sip.c	27 Jul 2005 02:17:06 -0000	1.796
+++ chan_sip.c	28 Jul 2005 18:24:04 -0000	1.797
@@ -9488,19 +9488,11 @@
 				p->expiry = max_expiry;
 		}
 		/* Go ahead and free RTP port */
-		if (p->rtp) {
-			if (p->owner) {
-				p->owner->fds[0] = -1;
-				p->owner->fds[1] = -1;
-			}
+		if (p->rtp && !p->owner) {
 			ast_rtp_destroy(p->rtp);
 			p->rtp = NULL;
 		}
-		if (p->vrtp) {
-			if (p->owner) {
-				p->owner->fds[2] = -1;
-				p->owner->fds[3] = -1;
-			}
+		if (p->vrtp && !p->owner) {
 			ast_rtp_destroy(p->vrtp);
 			p->vrtp = NULL;
 		}
@@ -9526,19 +9518,11 @@
 		ast_log(LOG_NOTICE, "Registration from '%s' failed for '%s'\n", get_header(req, "To"), ast_inet_ntoa(iabuf, sizeof(iabuf), sin->sin_addr));
 	if (res < 1) {
 		/* Go ahead and free RTP port */
-		if (p->rtp) {
-			if (p->owner) {
-				p->owner->fds[0] = -1;
-				p->owner->fds[1] = -1;
-			}
+		if (p->rtp && !p->owner) {
 			ast_rtp_destroy(p->rtp);
 			p->rtp = NULL;
 		}
-		if (p->vrtp) {
-			if (p->owner) {
-				p->owner->fds[2] = -1;
-				p->owner->fds[3] = -1;
-			}
+		if (p->vrtp && !p->owner) {
 			ast_rtp_destroy(p->vrtp);
 			p->vrtp = NULL;
 		}




More information about the svn-commits mailing list