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

Modified Files:
        chan_sip.c 
Log Message:
Fix fd's when we release rtp/vrtp


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.764
retrieving revision 1.765
diff -u -d -r1.764 -r1.765
--- chan_sip.c  18 Jun 2005 23:30:40 -0000      1.764
+++ chan_sip.c  19 Jun 2005 22:00:18 -0000      1.765
@@ -9189,10 +9189,18 @@
                }
                /* Go ahead and free RTP port */
                if (p->rtp) {
+                       if (p->owner) {
+                               p->owner->fds[0] = -1;
+                               p->owner->fds[1] = -1;
+                       }
                        ast_rtp_destroy(p->rtp);
                        p->rtp = NULL;
                }
                if (p->vrtp) {
+                       if (p->owner) {
+                               p->owner->fds[2] = -1;
+                               p->owner->fds[3] = -1;
+                       }
                        ast_rtp_destroy(p->vrtp);
                        p->vrtp = NULL;
                }
@@ -9219,10 +9227,18 @@
        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;
+                       }
                        ast_rtp_destroy(p->rtp);
                        p->rtp = NULL;
                }
                if (p->vrtp) {
+                       if (p->owner) {
+                               p->owner->fds[2] = -1;
+                               p->owner->fds[3] = -1;
+                       }
                        ast_rtp_destroy(p->vrtp);
                        p->vrtp = NULL;
                }

_______________________________________________
Asterisk-Cvs mailing list
[email protected]
http://lists.digium.com/mailman/listinfo/asterisk-cvs

Reply via email to