[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 16:19:51 CDT 2011
branch "master" has been updated
via 6ced932f19f094541afd5c7ef8b069ea83f26438 (commit)
from 238e6bb3ddcb4d697e3ac5189c73e0683132ad5e (commit)
Summary of changes:
src/PJSipSessionModule.cpp | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 6ced932f19f094541afd5c7ef8b069ea83f26438
Author: Joshua Colp <jcolp at digium.com>
Date: Tue Apr 12 18:22:42 2011 -0300
Fix a bug where attempting to send a message that would use a transport that is unavailable would cause a crash.
diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 58a30c5..b2884f1 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -933,13 +933,19 @@ void PJSipSessionModule::invOnStateChanged(pjsip_inv_session *inv, pjsip_event *
session_mod_info->mNeedsRemoval = true;
pjsip_dialog *dlg = inv->dlg;
PJSipDialogModInfo *dlg_mod_info = (PJSipDialogModInfo*) dlg->mod_data[mModule.id];
- dlg_mod_info->mNeedsRemoval = true;
+ if (dlg_mod_info)
+ {
+ dlg_mod_info->mNeedsRemoval = true;
+ }
lg(Debug) << "Replicating state on DISCONNECTED inv_state.";
replicateState(dlg_mod_info, NULL, session_mod_info);
delete session_mod_info;
- delete dlg_mod_info;
- dlg->mod_data[mModule.id] = 0;
- inv->mod_data[mModule.id] = 0;
+ inv->mod_data[mModule.id] = 0;
+ if (dlg_mod_info)
+ {
+ delete dlg_mod_info;
+ dlg->mod_data[mModule.id] = 0;
+ }
}
if (event->type == PJSIP_EVENT_RX_MSG && inv->state == PJSIP_INV_STATE_CONFIRMED)
{
-----------------------------------------------------------------------
--
asterisk-scf/release/sip.git
More information about the asterisk-scf-commits
mailing list