[asterisk-commits] file: trunk r402065 - in /trunk: ./ channels/ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Oct 26 07:56:09 CDT 2013


Author: file
Date: Sat Oct 26 07:56:08 2013
New Revision: 402065

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402065
Log:
chan_pjsip: Fix a crash when direct media is enabled and an ACK is received after the channel is hung up.

(closes issue ASTERISK-22731)
Reported by: Kinsey Moore
........

Merged revisions 402064 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/channels/chan_pjsip.c
    trunk/include/asterisk/res_pjsip_session.h

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: trunk/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_pjsip.c?view=diff&rev=402065&r1=402064&r2=402065
==============================================================================
--- trunk/channels/chan_pjsip.c (original)
+++ trunk/channels/chan_pjsip.c Sat Oct 26 07:56:08 2013
@@ -2046,7 +2046,7 @@
 static int chan_pjsip_incoming_ack(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
 {
 	if (rdata->msg_info.msg->line.req.method.id == PJSIP_ACK_METHOD) {
-		if (session->endpoint->media.direct_media.enabled) {
+		if (session->endpoint->media.direct_media.enabled && session->channel) {
 			ast_queue_control(session->channel, AST_CONTROL_SRCCHANGE);
 		}
 	}

Modified: trunk/include/asterisk/res_pjsip_session.h
URL: http://svnview.digium.com/svn/asterisk/trunk/include/asterisk/res_pjsip_session.h?view=diff&rev=402065&r1=402064&r2=402065
==============================================================================
--- trunk/include/asterisk/res_pjsip_session.h (original)
+++ trunk/include/asterisk/res_pjsip_session.h Sat Oct 26 07:56:08 2013
@@ -190,6 +190,9 @@
 	 * The reason is that the rdata passed into this function is a cloned rdata structure,
 	 * and its module data is not copied during the cloning operation.
 	 * If you need to get the dialog, you can get it via session->inv_session->dlg.
+	 *
+	 * \note
+	 * There is no guarantee that a channel will be present on the session when this is called.
      */
     int (*incoming_request)(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
     /*! 
@@ -203,6 +206,9 @@
 	 * The reason is that the rdata passed into this function is a cloned rdata structure,
 	 * and its module data is not copied during the cloning operation.
 	 * If you need to get the dialog, you can get it via session->inv_session->dlg.
+	 *
+	 * \note
+	 * There is no guarantee that a channel will be present on the session when this is called.
 	 */
     void (*incoming_response)(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
     /*!




More information about the asterisk-commits mailing list