[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
Thu Sep 23 06:50:14 CDT 2010


branch "master" has been updated
       via  b87d586b0d579a1ddc29704a2995c1977eb7f440 (commit)
      from  522497e7b530c166013e621c067e02203d0b6ac8 (commit)

Summary of changes:
 local-slice/SipStateReplicationIf.ice |    3 +++
 src/SipSession.cpp                    |    8 ++++++++
 src/SipSession.h                      |    4 ++++
 src/SipStateReplicatorListener.cpp    |    3 ++-
 4 files changed, 17 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit b87d586b0d579a1ddc29704a2995c1977eb7f440
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Sep 23 08:53:20 2010 -0300

    Add a missing item (listeners) to the session data item.

diff --git a/local-slice/SipStateReplicationIf.ice b/local-slice/SipStateReplicationIf.ice
index 90297ed..4354ab6 100644
--- a/local-slice/SipStateReplicationIf.ice
+++ b/local-slice/SipStateReplicationIf.ice
@@ -118,6 +118,8 @@ module V1
 	  bool mIsClient;
    };
 
+   sequence<AsteriskSCF::SessionCommunications::V1::SessionListener*> SessionListenerSeq;
+
    // Should this exist within MediaIf.ice? Are we going to pass around a sequence of sessions elsewhere?
    //sequence<AsteriskSCF::Media::V1::Session*> MediaSessionSeq;
 
@@ -131,6 +133,7 @@ module V1
       AsteriskSCF::Media::V1::StreamSourceSeq mSources;
       AsteriskSCF::Media::V1::StreamSinkSeq mSinks;
       AsteriskSCF::Media::V1::Session *mMediaSession;
+      SessionListenerSeq mListeners;
    };
 
 }; //module V1
diff --git a/src/SipSession.cpp b/src/SipSession.cpp
index cad1164..77b634e 100644
--- a/src/SipSession.cpp
+++ b/src/SipSession.cpp
@@ -595,6 +595,14 @@ AsteriskSCF::SessionCommunications::V1::SessionPrx& SipSession::getSessionProxy(
    return mImplPriv->mSessionProxy;
 }
 
+/**
+ * Internal function which sets the listeners explicitly.
+ */
+void SipSession::setListeners(const AsteriskSCF::SIP::V1::SessionListenerSeq& listeners)
+{
+   mImplPriv->mListeners = listeners;
+}
+
 bool SipSession::operator==(const SipSession &other) const {
    return (this->mImplPriv->mInviteSession == other.mImplPriv->mInviteSession);
 }
diff --git a/src/SipSession.h b/src/SipSession.h
index 10fcfae..dc9e5b1 100644
--- a/src/SipSession.h
+++ b/src/SipSession.h
@@ -18,6 +18,8 @@
 #include <Media/MediaIf.h>
 #include <Media/RTP/MediaRTPIf.h>
 
+#include "SipStateReplicationIf.h"
+
 #include <pjsip.h>
 #include <pjmedia.h>
 #include <pjsip_ua.h>
@@ -92,6 +94,8 @@ public:
    std::vector<AsteriskSCF::SessionCommunications::V1::SessionListenerPrx>& getListeners();
 
    AsteriskSCF::SessionCommunications::V1::SessionPrx& getSessionProxy();
+
+   void setListeners(const AsteriskSCF::SIP::V1::SessionListenerSeq&);
 private:
    void requestRTPSessions(AsteriskSCF::Media::V1::FormatSeq& formats);
 
diff --git a/src/SipStateReplicatorListener.cpp b/src/SipStateReplicatorListener.cpp
index 7decc1f..28f531f 100644
--- a/src/SipStateReplicatorListener.cpp
+++ b/src/SipStateReplicatorListener.cpp
@@ -91,8 +91,9 @@ public:
 	    else
 	    {
 	       localitem = i->second;
-	       // TODO: Determine if there is anything that can change a session and not just create it, currently the answer is no
 	    }
+
+	    localitem->getSession()->setListeners(session->mListeners);
 	 }
 	 else if ((dialog = SipDialogStateItemPtr::dynamicCast((*item))))
 	 {

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list