[asterisk-scf-commits] asterisk-scf/release/sip.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Tue Apr 12 10:55:06 CDT 2011
branch "master" has been updated
via 238e6bb3ddcb4d697e3ac5189c73e0683132ad5e (commit)
from 0024d93bcf841b13eec471b2d3f726cdbe686978 (commit)
Summary of changes:
src/SipSession.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
- Log -----------------------------------------------------------------
commit 238e6bb3ddcb4d697e3ac5189c73e0683132ad5e
Author: Mark Michelson <mmichelson at digium.com>
Date: Tue Apr 12 10:52:47 2011 -0500
Make sure not to try to end a non-existent inv_session.
This was triggered by attempting to call a destination that did not
have a host and port configured. The session setup would not be able
to create a pjsip_inv_session, so when stop() was called on the session,
we were passing a NULL pointer to PJSIP, triggering an assertion.
It's perfectly valid for the pjsip_inv_session to be NULL when stopping
a session, so we just need to make sure we don't pass it on to PJSIP.
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index cd003e3..ed8d08d 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -523,7 +523,7 @@ void SipSession::stop(const AsteriskSCF::SessionCommunications::V1::ResponseCode
// On an outbound call, if we have not received a provisional response yet, then PJSIP will
// set packet NULL but still return PJ_SUCCESS. In this case, if we attempt to call pjsip_inv_send_msg,
// then we will trigger an assertion since the packet we pass in is NULL.
- if ((pjsip_inv_end_session(mImplPriv->mInviteSession, code, NULL, &packet)) == PJ_SUCCESS && packet)
+ if (mImplPriv->mInviteSession && (pjsip_inv_end_session(mImplPriv->mInviteSession, code, NULL, &packet) == PJ_SUCCESS) && packet)
{
pjsip_inv_send_msg(mImplPriv->mInviteSession, packet);
}
-----------------------------------------------------------------------
--
asterisk-scf/release/sip.git
More information about the asterisk-scf-commits
mailing list