summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorMatt Jordan <mjordan@digium.com>2015-04-24 09:24:54 -0500
committerGerrit Code Review <gerrit2@gerrit.digium.api>2015-04-24 09:24:54 -0500
commit61c8ae548ad8a789154f3be47ec2a743ccd6ae9e (patch)
tree36f325a9f3e58d85e63fed6727f0e0afcfea4eac /res
parent1a8355622da2cad7e9748fda495795ca9ed9d38a (diff)
parent89a3fc0572222bda44b0cd5d950ebe3ab57f3aca (diff)
Merge "res_pjsip_t38: Don't crash on authenticated reinvite after originated T.38 FAX."
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip_t38.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/res/res_pjsip_t38.c b/res/res_pjsip_t38.c
index f097909bd..08e7cf935 100644
--- a/res/res_pjsip_t38.c
+++ b/res/res_pjsip_t38.c
@@ -470,6 +470,11 @@ static void t38_attach_framehook(struct ast_sip_session *session)
.chan_breakdown_cb = t38_masq,
};
+ /* If the channel's already gone, bail */
+ if (!session->channel) {
+ return;
+ }
+
/* Only attach the framehook if t38 is enabled for the endpoint */
if (!session->endpoint->media.t38.enabled) {
return;
@@ -504,14 +509,14 @@ static void t38_attach_framehook(struct ast_sip_session *session)
ast_channel_unlock(session->channel);
}
-/*! \brief Function called when an INVITE goes out */
+/*! \brief Function called when an INVITE arrives */
static int t38_incoming_invite_request(struct ast_sip_session *session, struct pjsip_rx_data *rdata)
{
t38_attach_framehook(session);
return 0;
}
-/*! \brief Function called when an INVITE comes in */
+/*! \brief Function called when an INVITE is sent */
static void t38_outgoing_invite_request(struct ast_sip_session *session, struct pjsip_tx_data *tdata)
{
t38_attach_framehook(session);