[svn-commits] file: branch 12 r402064 - in /branches/12: channels/ include/asterisk/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Oct 26 07:55:13 CDT 2013


Author: file
Date: Sat Oct 26 07:55:11 2013
New Revision: 402064

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=402064
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

Modified:
    branches/12/channels/chan_pjsip.c
    branches/12/include/asterisk/res_pjsip_session.h

Modified: branches/12/channels/chan_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/channels/chan_pjsip.c?view=diff&rev=402064&r1=402063&r2=402064
==============================================================================
--- branches/12/channels/chan_pjsip.c (original)
+++ branches/12/channels/chan_pjsip.c Sat Oct 26 07:55:11 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: branches/12/include/asterisk/res_pjsip_session.h
URL: http://svnview.digium.com/svn/asterisk/branches/12/include/asterisk/res_pjsip_session.h?view=diff&rev=402064&r1=402063&r2=402064
==============================================================================
--- branches/12/include/asterisk/res_pjsip_session.h (original)
+++ branches/12/include/asterisk/res_pjsip_session.h Sat Oct 26 07:55:11 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 svn-commits mailing list