[Asterisk-code-review] res pjsip session.c: Fix crashes seen when call cancelled. (asterisk[13])
Richard Mudgett
asteriskteam at digium.com
Thu Jul 30 17:08:10 CDT 2015
Richard Mudgett has uploaded a new change for review.
https://gerrit.asterisk.org/995
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(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/95/995/1
diff --git a/res/res_pjsip_session.c b/res/res_pjsip_session.c
index 5eb72b4..539bfc1 100644
--- a/res/res_pjsip_session.c
+++ b/res/res_pjsip_session.c
@@ -2681,8 +2681,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/995
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb75fdca0321f5447d5dac737a632a5f03614427
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
More information about the asterisk-code-review
mailing list