mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-09 11:28:25 +00:00
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 git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@402064 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2046,7 +2046,7 @@ static void chan_pjsip_incoming_response(struct ast_sip_session *session, struct
|
|||||||
static int chan_pjsip_incoming_ack(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
|
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 (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);
|
ast_queue_control(session->channel, AST_CONTROL_SRCCHANGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,6 +190,9 @@ struct ast_sip_session_supplement {
|
|||||||
* The reason is that the rdata passed into this function is a cloned rdata structure,
|
* 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.
|
* 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.
|
* 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);
|
int (*incoming_request)(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
|
||||||
/*!
|
/*!
|
||||||
@@ -203,6 +206,9 @@ struct ast_sip_session_supplement {
|
|||||||
* The reason is that the rdata passed into this function is a cloned rdata structure,
|
* 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.
|
* 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.
|
* 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);
|
void (*incoming_response)(struct ast_sip_session *session, struct pjsip_rx_data *rdata);
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Reference in New Issue
Block a user