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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Thu Aug 25 14:58:41 CDT 2011


branch "master" has been updated
       via  fdf2ec9681b3ac0b879dd445bba76cb9baa22745 (commit)
      from  9d646ac41b175c67edb7759a2ec0bc2c1d99b1a1 (commit)

Summary of changes:
 config/SipConfigurator.py    |    2 +-
 src/PJSipRegistrarModule.cpp |   11 ++++++++---
 2 files changed, 9 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit fdf2ec9681b3ac0b879dd445bba76cb9baa22745
Author: Mark Michelson <mmichelson at digium.com>
Date:   Thu Aug 25 14:59:22 2011 -0500

    * Adjust SipConfigurator to use proper service locator parameter type.
    * Fix registrar so it does not try to replicate state if it shouldn't.

diff --git a/config/SipConfigurator.py b/config/SipConfigurator.py
index bafe933..88639a8 100755
--- a/config/SipConfigurator.py
+++ b/config/SipConfigurator.py
@@ -256,7 +256,7 @@ class SipSectionVisitors(Configurator.SectionVisitors):
             self.visit_endpoint(config, section)
 
 # In order to do service locator based lookup we need to pass in a params object
-serviceLocatorParams = AsteriskSCF.Configuration.SipSessionManager.V1.SipConfigurationParams()
+serviceLocatorParams = AsteriskSCF.Core.Discovery.V1.ServiceLocatorParams()
 serviceLocatorParams.category = AsteriskSCF.Configuration.SipSessionManager.V1.ConfigurationDiscoveryCategory
 serviceLocatorParams.service = 'default' 
 
diff --git a/src/PJSipRegistrarModule.cpp b/src/PJSipRegistrarModule.cpp
index b9232a9..9dcbbb9 100644
--- a/src/PJSipRegistrarModule.cpp
+++ b/src/PJSipRegistrarModule.cpp
@@ -395,6 +395,11 @@ public:
 
     void execute()
     {
+        if (mReplicationContext->isReplicating() == false)
+        {
+            return;
+        }
+
         try
         {
             if (!mNewBindings.empty())
@@ -403,7 +408,7 @@ public:
                 SipRegistrarStateItemPtr newItem(new SipRegistrarStateItem(mAOR, mAOR, newDict, true));
                 SipStateItemSeq items;
                 items.push_back(newItem);
-                mReplicationContext->getReplicator()->setState(items);
+                mReplicationContext->getReplicator().tryOneWay()->setState(items);
             }
             
             if (!mExistingBindings.empty())
@@ -412,7 +417,7 @@ public:
                 SipRegistrarStateItemPtr existingItem(new SipRegistrarStateItem(mAOR, mAOR, existingDict, false));
                 SipStateItemSeq items;
                 items.push_back(existingItem);
-                mReplicationContext->getReplicator()->setState(items);
+                mReplicationContext->getReplicator().tryOneWay()->setState(items);
             }
 
             if (!mRemovedBindings.empty())
@@ -421,7 +426,7 @@ public:
                 SipRegistrarStateItemPtr removedItem(new SipRegistrarStateItem(mAOR, mAOR, removedDict, false));
                 SipStateItemSeq items;
                 items.push_back(removedItem);
-                mReplicationContext->getReplicator()->removeStateForItems(items);
+                mReplicationContext->getReplicator().tryOneWay()->removeStateForItems(items);
             }
         }
         catch (const Ice::TwowayOnlyException&)

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


-- 
asterisk-scf/release/sip.git



More information about the asterisk-scf-commits mailing list