[asterisk-commits] res pjsip session.c: Fix crashes seen when call cancelled. (asterisk[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jul 31 11:54:42 CDT 2015
Joshua Colp has submitted this change and it was merged.
Change subject: res_pjsip_session.c: Fix crashes seen when call cancelled.
......................................................................
res_pjsip_session.c: Fix crashes seen when call cancelled.
Two testsuite tests crashed in the same place as a result of an INVITE
being CANCELed.
tests/channels/pjsip/resolver/srv/failover/in_dialog/transport_unspecified
tests/channels/pjsip/resolver/srv/failover/in_dialog/transport_tcp
The session pointer is no longer in the inv->mod_data[session_module.id]
location because the INVITE transaction has reached the terminated state.
ASTERISK-25297 #close
Reported by: Richard Mudgett
Change-Id: Idb75fdca0321f5447d5dac737a632a5f03614427
---
M res/res_pjsip_session.c
1 file changed, 4 insertions(+), 2 deletions(-)
Approvals:
Mark Michelson: Looks good to me, but someone else must approve
Anonymous Coward #1000019: Verified
Ashley Sanders: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 4544671..625ab8b 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -2713,8 +2713,10 @@
struct ast_sip_session *session = inv->mod_data[session_module.id];
const pjmedia_sdp_session *local, *remote;
- if (!session->channel) {
- /* If we don't have a channel. We really don't care about media updates.
+ if (!session || !session->channel) {
+ /*
+ * If we don't have a session or channel then we really
+ * don't care about media updates.
* Just ignore
*/
return;
--
To view, visit https://gerrit.asterisk.org/994
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Idb75fdca0321f5447d5dac737a632a5f03614427
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
More information about the asterisk-commits
mailing list