[asterisk-scf-commits] asterisk-scf/integration/sip.git branch "transfer" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Oct 14 08:17:28 CDT 2010


branch "transfer" has been updated
       via  e3295cdaaf584e78619d2784e72bcece305e7c68 (commit)
       via  7138ea7c5c1928f96326a2fa1b39921435638359 (commit)
       via  0fd99109e48ddafd46fcb39899f8ede7b2845e20 (commit)
      from  f719d3d9c1fd646e5765657eb8712d2d9c9c32a9 (commit)

Summary of changes:
 src/PJSipSessionModule.cpp |   12 ++++++++++--
 src/SipSession.cpp         |   14 ++++++++++----
 2 files changed, 20 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit e3295cdaaf584e78619d2784e72bcece305e7c68
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Oct 14 10:15:28 2010 -0300

    Only attempt to update session state information if an invite session is present.

diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index 515fd2e..8d1fcc3 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -199,8 +199,11 @@ SipSession::SipSession(Ice::ObjectAdapterPtr adapter, SipEndpointPtr endpoint, c
 AsteriskSCF::SessionCommunications::V1::SessionInfoPtr SipSession::addListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current& current)
 {
    mImplPriv->mListeners.push_back(listener);
-   PJSipSessionModInfo *session_mod_info = static_cast<PJSipSessionModInfo*>(mImplPriv->mInviteSession->mod_data[mImplPriv->mManager->getSessionModule().id]);
-   session_mod_info->updateSessionState(mImplPriv->mInviteSession);
+   if (mImplPriv->mInviteSession)
+   {
+      PJSipSessionModInfo *session_mod_info = static_cast<PJSipSessionModInfo*>(mImplPriv->mInviteSession->mod_data[mImplPriv->mManager->getSessionModule().id]);
+      session_mod_info->updateSessionState(mImplPriv->mInviteSession);
+   }
    return getInfo(current);
 }
 
@@ -369,8 +372,11 @@ void SipSession::progress(const AsteriskSCF::SessionCommunications::V1::Response
 void SipSession::removeListener(const AsteriskSCF::SessionCommunications::V1::SessionListenerPrx& listener, const Ice::Current&)
 {
    mImplPriv->mListeners.erase(std::remove(mImplPriv->mListeners.begin(), mImplPriv->mListeners.end(), listener), mImplPriv->mListeners.end());
-   PJSipSessionModInfo *session_mod_info = static_cast<PJSipSessionModInfo*>(mImplPriv->mInviteSession->mod_data[mImplPriv->mManager->getSessionModule().id]);
-   session_mod_info->updateSessionState(mImplPriv->mInviteSession);
+   if (mImplPriv->mInviteSession)
+   {
+      PJSipSessionModInfo *session_mod_info = static_cast<PJSipSessionModInfo*>(mImplPriv->mInviteSession->mod_data[mImplPriv->mManager->getSessionModule().id]);
+      session_mod_info->updateSessionState(mImplPriv->mInviteSession);
+   }
 }
 
 /**

commit 7138ea7c5c1928f96326a2fa1b39921435638359
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Oct 14 10:15:04 2010 -0300

    Log whether the bridge is present when outputting replication state information.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index efe0a9f..6c40e20 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -182,6 +182,7 @@ void PJSipSessionModule::replicateState(PJSipDialogModInfo *dlgInfo, PJSipTransa
       lg(Debug) << "Session object identity: " << sessionInfo->mSessionState->mSessionObjectId.name;
       lg(Debug) << "Media session object identity: " << sessionInfo->mSessionState->mMediaSessionObjectId.name;
       lg(Debug) << "Media session: " << sessionInfo->mSessionState->mMediaSession;
+      lg(Debug) << "Bridge: " << sessionInfo->mSessionState->mBridge;
       lg(Debug) << "--- Begin Invite Session " << sessionInfo->mInviteState->key;
       lg(Debug) << "Current state: " << sessionInfo->mInviteState->mCurrentState;
       lg(Debug) << "Cancelling: " << sessionInfo->mInviteState->mCancelling;

commit 0fd99109e48ddafd46fcb39899f8ede7b2845e20
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Oct 14 10:14:37 2010 -0300

    Handle exceptions thrown when getting the bridge during replication state updates.

diff --git a/src/PJSipSessionModule.cpp b/src/PJSipSessionModule.cpp
index 2d6ac1a..efe0a9f 100644
--- a/src/PJSipSessionModule.cpp
+++ b/src/PJSipSessionModule.cpp
@@ -75,8 +75,15 @@ void PJSipSessionModInfo::updateSessionState(pjsip_inv_session *inv_session)
       mSessionState->mSinks = mSession->getSinks();
       mSessionState->mMediaSession = mSession->getHiddenMediaSession();
       mSessionState->mListeners = mSession->getListeners();
-      Ice::Current current;
-      mSessionState->mBridge = mSession->getBridge(current);
+      try
+      {
+	 Ice::Current current;
+	 mSessionState->mBridge = mSession->getBridge(current);
+      }
+      catch (...)
+      {
+	 mSessionState->mBridge = 0;
+      }
    }
 
    //Now we get stuff from the inv_session itself.

-----------------------------------------------------------------------


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list