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

Modified Files:
        chan_sip.c 
Log Message:
ensure SIP_HEADER does not segfault when called on hung-up channels (bug #4756, 
different fix than posted patch)


Index: chan_sip.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_sip.c,v
retrieving revision 1.784
retrieving revision 1.785
diff -u -d -r1.784 -r1.785
--- chan_sip.c  20 Jul 2005 17:05:18 -0000      1.784
+++ chan_sip.c  25 Jul 2005 17:13:24 -0000      1.785
@@ -8158,6 +8158,13 @@
        }
 
        p = chan->tech_pvt;
+
+       /* If there is no private structure, this channel is no longer alive */
+       if (!p) {
+               ast_mutex_unlock(&chan->lock);
+               return NULL;
+       }
+
        content = get_header(&p->initreq, data);
 
        if (ast_strlen_zero(content)) {

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

Reply via email to