[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "master" updated.
Commits to the Asterisk SCF project code repositories
asterisk-scf-commits at lists.digium.com
Mon Sep 27 10:50:49 CDT 2010
branch "master" has been updated
via 043ce31eef3dd46fb835cdb38a7d347fe947c1d8 (commit)
from 5fe9fe68b89ebcfdee036aff42fcfc785faf3628 (commit)
Summary of changes:
src/PJSipSessionModule.cpp | 6 +++---
src/PJSipSessionModule.h | 2 +-
src/SipSession.cpp | 3 +--
3 files changed, 5 insertions(+), 6 deletions(-)
- Log -----------------------------------------------------------------
commit 043ce31eef3dd46fb835cdb38a7d347fe947c1d8
Author: Joshua Colp <jcolp at digium.com>
Date: Mon Sep 27 12:49:51 2010 -0300
Pass the session in when constructing the session mod info class, now session details are filled in as expected.
diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index a57f2e8..e6a619e 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -157,7 +157,8 @@ TransactionState PJSipTransactionModInfo::transactionStateTranslate(pjsip_tsx_st
return retState;
}
-PJSipSessionModInfo::PJSipSessionModInfo(pjsip_inv_session *inv_session) : mSessionState(new SipSessionStateItem), mInviteState(new SipInviteSessionStateItem), mNeedsReplication(true), mNeedsRemoval(false)
+PJSipSessionModInfo::PJSipSessionModInfo(pjsip_inv_session *inv_session, SipSessionPtr session) : mSessionState(new SipSessionStateItem), mInviteState(new SipInviteSessionStateItem), mNeedsReplication(true),
+ mNeedsRemoval(false), mSession(session)
{
mSessionState->key = IceUtil::generateUUID();
updateSessionState(inv_session);
@@ -455,8 +456,7 @@ static void handle_new_invite(pjsip_rx_data *rdata)
SipSessionPtr session = caller->createSession(destination);
session->setInviteSession(inv_session);
session->setDialog(dlg);
- PJSipSessionModInfo *session_mod_info = new PJSipSessionModInfo(inv_session);
- session_mod_info->setSessionPtr(session);
+ PJSipSessionModInfo *session_mod_info = new PJSipSessionModInfo(inv_session, session);
inv_session->mod_data[module->id] = (void *)session_mod_info;
dlg->mod_data[module->id] = (void *)dlg_mod_info;
diff --git a/src/PJSipSessionModule.h b/src/PJSipSessionModule.h
index 208fadb..1425b12 100644
--- a/src/PJSipSessionModule.h
+++ b/src/PJSipSessionModule.h
@@ -60,7 +60,7 @@ private:
class PJSipSessionModInfo
{
public:
- PJSipSessionModInfo(pjsip_inv_session *inv_session);
+ PJSipSessionModInfo(pjsip_inv_session *inv_session, SipSessionPtr);
~PJSipSessionModInfo();
void updateSessionState(pjsip_inv_session *inv_session);
SipSessionPtr getSessionPtr();
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index 7373a6e..289aa18 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -349,9 +349,8 @@ void SipSession::start(const Ice::Current&)
}
// Record our session within the dialog so code handling pjsip events can do STUFF
- PJSipSessionModInfo *session_mod_info = new PJSipSessionModInfo(inviteSession);
SipSessionPtr session = new SipSession(*this);
- session_mod_info->setSessionPtr(session);
+ PJSipSessionModInfo *session_mod_info = new PJSipSessionModInfo(inviteSession, session);
inviteSession->mod_data[SipChannelServiceDataModel::getInstance().getPJSipManager()->getSessionModule()->id] = (void*)session_mod_info;
// Create the actual INVITE packet
-----------------------------------------------------------------------
--
asterisk-scf/integration/sip.git
More information about the asterisk-scf-commits
mailing list