[asterisk-scf-commits] asterisk-scf/integration/routing.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Sep 15 10:18:02 CDT 2010


branch "master" has been updated
       via  96e40608ce33bcdb3c46373cec0392568b6aec76 (commit)
      from  6375f3ea593593014d0963e7210cc50af20c5c23 (commit)

Summary of changes:
 config/README.txt     |    6 +++---
 src/SessionRouter.cpp |   15 ++++++++++++---
 2 files changed, 15 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit 96e40608ce33bcdb3c46373cec0392568b6aec76
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Wed Sep 15 10:16:05 2010 -0500

    Minor fix for SessionListener implemementation.

diff --git a/config/README.txt b/config/README.txt
index a79aa00..9433895 100644
--- a/config/README.txt
+++ b/config/README.txt
@@ -4,12 +4,12 @@ Run Order for testing:
 
   iceboxd --Ice.Config=icestorm.config
  
-  service_locator --Ice.Config=test_service_locator.config
-
-  RoutingTest --Ice.Config=routingtest.config
+  service_locator --Ice.Config=service_locator.config
 
   BasicRoutingService --Ice.Config=basicrouting.config
 
+  RoutingTest --Ice.Config=routingtest.config
+
 
 
   
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 70dd4c5..03119da 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -31,7 +31,7 @@ namespace BasicRoutingService
 class SessionListenerImpl : public SessionListener
 {
 public:
-   SessionListenerImpl(const SessionPrx& source) : mTerminated(false)
+   SessionListenerImpl(const SessionPrx& source) : mListenerPrx(0), mTerminated(false)
     {
        addSession(source);
     }
@@ -69,7 +69,6 @@ public:
              (*s)->stop(responseCode);
           }
        }
-
     }
 
     virtual void unheld(const SessionPrx& session, const ::Ice::Current& = ::Ice::Current())
@@ -79,7 +78,11 @@ public:
     void addSession(SessionPrx session)
     {
        mSessions.push_back(session);
-       session->addListener(mListenerPrx);
+
+       if (mListenerPrx != 0)
+       {
+          session->addListener(mListenerPrx);
+       }
     }
     
     SessionSeq& getSessions()
@@ -107,6 +110,12 @@ public:
     void setProxy(SessionListenerPrx proxy)
     {
        mListenerPrx = proxy;
+
+       SessionSeq::iterator i;
+       for (i = mSessions.begin(); i != mSessions.end(); ++i)
+       {
+          (*i)->addListener(mListenerPrx);
+       }
     }
 
     SessionListenerPrx getProxy()

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


-- 
asterisk-scf/integration/routing.git



More information about the asterisk-scf-commits mailing list