[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 30 12:05:16 CDT 2010


branch "master" has been updated
       via  52fb14fd606c015060c80dc7a5d54f6c125728d3 (commit)
      from  0d48515dabb96e2bfe40a29545f154186506686a (commit)

Summary of changes:
 src/SipChannelServiceApp.cpp |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)


- Log -----------------------------------------------------------------
commit 52fb14fd606c015060c80dc7a5d54f6c125728d3
Author: Joshua Colp <jcolp at digium.com>
Date:   Thu Sep 30 14:08:15 2010 -0300

    Fix a bug where the state replicator listener was never removed from the state replicator upon shutdown.

diff --git a/src/SipChannelServiceApp.cpp b/src/SipChannelServiceApp.cpp
index 0a0942a..093685b 100644
--- a/src/SipChannelServiceApp.cpp
+++ b/src/SipChannelServiceApp.cpp
@@ -174,6 +174,7 @@ private:
    void deregisterFromRoutingService();
    void configureEndpoints(boost::shared_ptr<SipEndpointFactory> endpointFactoryPtr);
    void registerPJSipModules();
+   void deregisterFromStateReplicator();
 
    bool mDone;
    std::string mAppName;
@@ -549,6 +550,16 @@ void SipChannelServiceApp::registerPJSipModules()
 	}
 }
 
+void SipChannelServiceApp::deregisterFromStateReplicator()
+{
+   if (mDataModelInstance.mActive == true)
+   {
+      return;
+   }
+
+   mDataModelInstance.mStateReplicator->removeListener(mReplicatorListenerProxy);
+}
+
 /**
  * Create the primary functional objects of this component.
  *   @param appName Name of the application or component.
@@ -655,6 +666,9 @@ int SipChannelServiceApp::run(int argc, char* argv[])
    // Remove our endpoint locator from the routing service.
    deregisterFromRoutingService();
 
+   // Remove our state listener
+   deregisterFromStateReplicator();
+
    // Give our singleton a chance to shut down gracefully.
    mDataModelInstance.cleanup();
 

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


-- 
asterisk-scf/integration/sip.git



More information about the asterisk-scf-commits mailing list