[asterisk-scf-commits] asterisk-scf/release/bridging.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Jun 19 13:26:20 CDT 2012


branch "master" has been updated
       via  b1d811d91f3814e17351f9d6a5e4e3573dbde368 (commit)
      from  55fbdc3b30aed0195d034082502f7798b0351059 (commit)

Summary of changes:
 src/BridgeImpl.cpp        |   19 ++++++++++---------
 src/BridgeManagerImpl.cpp |    2 ++
 src/ListenerManager.h     |    3 +++
 3 files changed, 15 insertions(+), 9 deletions(-)


- Log -----------------------------------------------------------------
commit b1d811d91f3814e17351f9d6a5e4e3573dbde368
Author: Brent Eagles <beagles at digium.com>
Date:   Tue Jun 19 15:54:41 2012 -0230

    - Remove annoying duplicate period from generated operation contexts.
    - Shutdown listener managers that might have initializer threads kicking around.

diff --git a/src/BridgeImpl.cpp b/src/BridgeImpl.cpp
index ae578b4..83e0015 100755
--- a/src/BridgeImpl.cpp
+++ b/src/BridgeImpl.cpp
@@ -2019,6 +2019,7 @@ void BridgeImpl::destroy(const AsteriskSCF::System::V1::OperationContextPtr& con
     // Remove references to the session listener implementation.
     //
     mObjAdapter->remove(mSessionListenerPrx->ice_getIdentity());
+    mListeners->stop();
 
     try
     {
@@ -2530,43 +2531,43 @@ void BridgeImpl::getAddSessionsTasks(QueuedTasks& tasks,
     //
     // FAILOVER: You don't want this to happen after failover.
     //
-    tasks.push_back(new UnplugMedia(calculateOperationContext(context, ".UnplugMedia"), this));
+    tasks.push_back(new UnplugMedia(calculateOperationContext(context, "UnplugMedia"), this));
     //
     // FAILOVER: This probably isn't so bad.
     //
-    tasks.push_back(new SetBridgeTask(calculateOperationContext(context, ".SetBridgeTask"),
+    tasks.push_back(new SetBridgeTask(calculateOperationContext(context, "SetBridgeTask"),
                 mSessions, mPrx, mSessionListenerPrx, sessions, tracker));
     //
     // FAILOVER: Also not so bad as long as duplicates are handled properly.
     //
-    tasks.push_back(new AddToListeners(calculateOperationContext(context, ".AddToListeners"), mListeners, tracker, getCookies()));
+    tasks.push_back(new AddToListeners(calculateOperationContext(context, "AddToListeners"), mListeners, tracker, getCookies()));
     //
     // FAILOVER: This might have side-effects. Might be best not to redo it.
     //
-    tasks.push_back(new SetAndGetSessionControllerTask(calculateOperationContext(context, ".SetAndGetSessionController"),
+    tasks.push_back(new SetAndGetSessionControllerTask(calculateOperationContext(context, "SetAndGetSessionController"),
             mObjAdapter, mSessions, sessions, this, mLogger));
     //
     // FAILOVER: Avoid redoing.
     //
-    tasks.push_back(new ForwardCallerIDTask(calculateOperationContext(context, ".ForwardCallerIDTask"), this, source, callerID, mLogger));
+    tasks.push_back(new ForwardCallerIDTask(calculateOperationContext(context, "ForwardCallerIDTask"), this, source, callerID, mLogger));
     //
     // FAILOVER: Avoid redoing.
     //
-    tasks.push_back(new ForwardRedirectionsUpdatedTask(calculateOperationContext(context, ".ForwardRedirectionsUpdateTask"),
+    tasks.push_back(new ForwardRedirectionsUpdatedTask(calculateOperationContext(context, "ForwardRedirectionsUpdateTask"),
             this, source, redirects, mLogger));
     //
     // FAILOVER: Avoid redoing.
     //
-    tasks.push_back(new SetupMedia(calculateOperationContext(context, ".SetupMedia"), this));
+    tasks.push_back(new SetupMedia(calculateOperationContext(context, "SetupMedia"), this));
     //
     // FAILOVER: Avoid redoing.
     //
-    tasks.push_back(new ConnectTelephonyEventsTask(calculateOperationContext(context, ".ConnectTelephonyEventsTask"),
+    tasks.push_back(new ConnectTelephonyEventsTask(calculateOperationContext(context, "ConnectTelephonyEventsTask"),
             this, sessions, mLogger));
     //
     // FAILOVER: No point in doing this one again.
     //
-    tasks.push_back(new UpdateTask(calculateOperationContext(context, ".UpdateTask"), this));
+    tasks.push_back(new UpdateTask(calculateOperationContext(context, "UpdateTask"), this));
 }
 
 void BridgeImpl::statePreCheck()
diff --git a/src/BridgeManagerImpl.cpp b/src/BridgeManagerImpl.cpp
index 3eb7a05..be2da67 100644
--- a/src/BridgeManagerImpl.cpp
+++ b/src/BridgeManagerImpl.cpp
@@ -727,6 +727,8 @@ void BridgeManagerImpl::shutdown(const AsteriskSCF::System::V1::OperationContext
             {
                 mLogger(Debug) << ex.what() << " caught while shutting down and unregistering supporting services.";
             }
+            mListeners->stop();
+            mListeners = 0;
             mAdapter->getCommunicator()->shutdown();
             mState->runningState = AsteriskSCF::Replication::BridgeService::V1::Destroyed;
             data->getMonitor()->setCompleted();
diff --git a/src/ListenerManager.h b/src/ListenerManager.h
index c8d6843..7f14421 100644
--- a/src/ListenerManager.h
+++ b/src/ListenerManager.h
@@ -93,6 +93,8 @@ public:
 
     virtual ~ListenerManagerT()
     {
+        stop();
+
         if(mTopic)
         {
             try
@@ -181,6 +183,7 @@ public:
         if(mInitThread)
         {
             mInitThread->stop();
+            mInitThead = 0;
         }
     }
 

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


-- 
asterisk-scf/release/bridging.git



More information about the asterisk-scf-commits mailing list