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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Apr 10 23:11:48 CDT 2012


branch "retry_deux" has been updated
       via  2206e0fba207444861dce5ee82146485487d1d3e (commit)
      from  9b583ef4d6129967afab4f27c312850d69a3fe43 (commit)

Summary of changes:
 src/ConnectBridgedSessionsOperation.cpp            |    4 +-
 src/ConnectBridgedSessionsOperation.h              |    4 +-
 ...nectBridgedSessionsWithDestinationOperation.cpp |    4 +-
 ...onnectBridgedSessionsWithDestinationOperation.h |    4 +-
 src/EndpointRegistry.cpp                           |   40 ++++++++++----------
 src/RouteSessionOperation.cpp                      |    4 +-
 src/RouteSessionOperation.h                        |    4 +-
 src/SessionRouter.cpp                              |   12 +++---
 src/SessionRouterOperation.h                       |    6 +-
 9 files changed, 41 insertions(+), 41 deletions(-)


- Log -----------------------------------------------------------------
commit 2206e0fba207444861dce5ee82146485487d1d3e
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Tue Apr 10 23:11:29 2012 -0500

    Updates for some changes to OperationMonitor templates.

diff --git a/src/ConnectBridgedSessionsOperation.cpp b/src/ConnectBridgedSessionsOperation.cpp
index 878278e..f80bbb5 100644
--- a/src/ConnectBridgedSessionsOperation.cpp
+++ b/src/ConnectBridgedSessionsOperation.cpp
@@ -65,7 +65,7 @@ namespace BasicRoutingService
  */
 
 ConnectBridgedSessionsOperation::ConnectBridgedSessionsOperation
-                           (const AMDContextData<AMD_SessionRouter_connectBridgedSessionsPtr>::Ptr& cookie,
+                           (const AMDContextData<AMD_SessionRouter_connectBridgedSessionsPtr>::ptr_type& cookie,
                             const OperationContextPtr& operationContext,
                             const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                             const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
@@ -94,7 +94,7 @@ ConnectBridgedSessionsOperation::ConnectBridgedSessionsOperation
  * Factory method for the operation. 
  */
 ConnectBridgedSessionsOperationPtr ConnectBridgedSessionsOperation::create
-                    (const AMDContextData<AMD_SessionRouter_connectBridgedSessionsPtr>::Ptr& cookie,
+                    (const AMDContextData<AMD_SessionRouter_connectBridgedSessionsPtr>::ptr_type& cookie,
                     const OperationContextPtr& operationContext,
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                     const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
diff --git a/src/ConnectBridgedSessionsOperation.h b/src/ConnectBridgedSessionsOperation.h
index 283fd46..dcd8b21 100644
--- a/src/ConnectBridgedSessionsOperation.h
+++ b/src/ConnectBridgedSessionsOperation.h
@@ -60,7 +60,7 @@ class  ConnectBridgedSessionsOperation : public SessionRouterOperation<AsteriskS
 {
 public:
     static ConnectBridgedSessionsOperationPtr create(
-                          const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsPtr>::Ptr& cookie,
+                          const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsPtr>::ptr_type& cookie,
                           const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
                           const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
                           const AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
@@ -73,7 +73,7 @@ public:
 
 protected:
     ConnectBridgedSessionsOperation(
-        const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsPtr>::Ptr& cookie,
+        const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsPtr>::ptr_type& cookie,
         const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
         const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
         const AsteriskSCF::SessionCommunications::V1::SessionPrx& bridgedSession, 
diff --git a/src/ConnectBridgedSessionsWithDestinationOperation.cpp b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
index 0361170..3bfa259 100644
--- a/src/ConnectBridgedSessionsWithDestinationOperation.cpp
+++ b/src/ConnectBridgedSessionsWithDestinationOperation.cpp
@@ -215,7 +215,7 @@ void ConnectBridgedSessionsWithDestinationOperation::initStateMachine()
  * This object is an instance of WorkQueue::Work so that it can enqueued to a worker thread. 
  */
 ConnectBridgedSessionsWithDestinationOperation::ConnectBridgedSessionsWithDestinationOperation(
-                          const AMDContextData<AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::Ptr& cookie,
+                          const AMDContextData<AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::ptr_type& cookie,
                           const OperationContextPtr& operationContext,
                           const SessionPrx& sessionToReplace, 
                           const ::std::string& destination, 
@@ -245,7 +245,7 @@ ConnectBridgedSessionsWithDestinationOperation::ConnectBridgedSessionsWithDestin
  * This is the factory method for this operation.
  */
 ConnectBridgedSessionsWithDestinationOperationPtr ConnectBridgedSessionsWithDestinationOperation::create(
-                          const AMDContextData<AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::Ptr& cookie,
+                          const AMDContextData<AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::ptr_type& cookie,
                           const OperationContextPtr& operationContext,
                           const SessionPrx& sessionToReplace, 
                           const ::std::string& destination, 
diff --git a/src/ConnectBridgedSessionsWithDestinationOperation.h b/src/ConnectBridgedSessionsWithDestinationOperation.h
index 9158dd6..35e6052 100644
--- a/src/ConnectBridgedSessionsWithDestinationOperation.h
+++ b/src/ConnectBridgedSessionsWithDestinationOperation.h
@@ -68,7 +68,7 @@ public:
      * Factory method for the class. This method creates an active operation. 
      */
     static ConnectBridgedSessionsWithDestinationOperationPtr create(
-        const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::Ptr& cookie,
+        const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::ptr_type& cookie,
         const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
         const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
         const std::string& destination, 
@@ -117,7 +117,7 @@ public:
 
 protected:
     ConnectBridgedSessionsWithDestinationOperation(
-        const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::Ptr& cookie,
+        const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::ptr_type& cookie,
         const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
         const AsteriskSCF::SessionCommunications::V1::SessionPrx& sessionToReplace, 
         const std::string& destination, 
diff --git a/src/EndpointRegistry.cpp b/src/EndpointRegistry.cpp
index b31cc94..1b488f8 100644
--- a/src/EndpointRegistry.cpp
+++ b/src/EndpointRegistry.cpp
@@ -461,14 +461,14 @@ void EndpointRegistry::addEndpointLocator(
     const Ice::Current&)
 {
     ContextDataPtr contextData;
-    try
+    if (!(contextData = Operations::checkAndThrow(mImpl->mOperationContextCache, operationContext)))
     {
-        if (!(contextData = Operations::checkAndThrow(mImpl->mOperationContextCache, operationContext)))
-        {
-            lg(Debug) << "EndpointRegistry::addEndpointLocator() detected retry for operation " << operationContext->id;
-            return;
-        }
+        lg(Debug) << "EndpointRegistry::addEndpointLocator() detected retry for operation " << operationContext->id;
+        return;
+    }
 
+    try
+    {
         lg(Debug) << "EndpointRegistry::addEndpointLocator() adding locator for " << locatorId << ". Proxy details: " << locator->ice_toString();
 
         EndpointLocatorMapIterator existing;
@@ -502,14 +502,14 @@ void EndpointRegistry::addEndpointLocator(
 void EndpointRegistry::removeEndpointLocator(const OperationContextPtr& operationContext, const std::string& locatorId, const Ice::Current&)
 {
     ContextDataPtr contextData;
-    try
+    if (!(contextData = Operations::checkAndThrow(mImpl->mOperationContextCache, operationContext)))
     {
-        if (!(contextData = Operations::checkAndThrow(mImpl->mOperationContextCache, operationContext)))
-        {
-            lg(Debug) << "EndpointRegistry::removeEndpointLocator() detected retry for operation " << operationContext->id;
-            return;
-        }
+        lg(Debug) << "EndpointRegistry::removeEndpointLocator() detected retry for operation " << operationContext->id;
+        return;
+    }
 
+    try
+    {
         lg(Debug) << "EndpointRegistry::removeEndpointLocator() removing locator " << locatorId;
 
         EndpointLocatorMapIterator existing;
@@ -551,14 +551,14 @@ void EndpointRegistry::setEndpointLocatorDestinationIds(
     const Ice::Current&)
 {
     ContextDataPtr contextData;
-    try
+    if (!(contextData = Operations::checkAndThrow(mImpl->mOperationContextCache, operationContext)))
     {
-        if (!(contextData = Operations::checkAndThrow(mImpl->mOperationContextCache, operationContext)))
-        {
-            lg(Debug) << "EndpointRegistry::setEndpointLocatorDestinationIds() detected retry for operation " << operationContext->id;
-            return;
-        }
+        lg(Debug) << "EndpointRegistry::setEndpointLocatorDestinationIds() detected retry for operation " << operationContext->id;
+        return;
+    }
 
+    try
+    {
         EndpointLocatorMapIterator existing;
         bool exists = mImpl->locatorExists(locatorId, existing);
 
@@ -599,7 +599,7 @@ void EndpointRegistry::clearEndpointLocators(const OperationContextPtr& operatio
     ContextDataPtr contextData;
     if (!(contextData = Operations::checkAndThrow(mImpl->mOperationContextCache, operationContext)))
     {
-        lg(Debug) << "EndpointRegistry::clearEndpointLocators() detected and ignoring duplicate call for operation " << operationContext->id;
+        lg(Debug) << "EndpointRegistry::clearEndpointLocators() detected retry for operation " << operationContext->id;
         return;
     }
 
@@ -619,7 +619,7 @@ void EndpointRegistry::setPolicy(const OperationContextPtr& operationContext, co
     ContextDataPtr contextData;
     if (!(contextData = Operations::checkAndThrow(mImpl->mOperationContextCache, operationContext)))
     {
-        lg(Debug) << "EndpointRegistry::setPolicy() detected and ignoring duplicate call for operation " << operationContext->id;
+        lg(Debug) << "EndpointRegistry::setPolicy() detected retry for operation " << operationContext->id;
         return;
     }
 
diff --git a/src/RouteSessionOperation.cpp b/src/RouteSessionOperation.cpp
index 0297a8c..69fa2ba 100644
--- a/src/RouteSessionOperation.cpp
+++ b/src/RouteSessionOperation.cpp
@@ -215,7 +215,7 @@ void RouteSessionOperation::initStateMachine()
  * This object is an instance of WorkQueue::Work so that
  * it can be enqueued to a worker thread. 
  */
-RouteSessionOperation::RouteSessionOperation(const AMDContextData<AMD_SessionRouter_routeSessionPtr>::Ptr& cookie,
+RouteSessionOperation::RouteSessionOperation(const AMDContextData<AMD_SessionRouter_routeSessionPtr>::ptr_type& cookie,
                                              const OperationContextPtr& operationContext,
                                              const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                                              const ::std::string& destination, 
@@ -246,7 +246,7 @@ RouteSessionOperation::RouteSessionOperation(const AMDContextData<AMD_SessionRou
 /**
  * This is the factory method for RouteSessionOperation.
  */
-RouteSessionOperationPtr RouteSessionOperation::create(const AMDContextData<AMD_SessionRouter_routeSessionPtr>::Ptr& cookie,
+RouteSessionOperationPtr RouteSessionOperation::create(const AMDContextData<AMD_SessionRouter_routeSessionPtr>::ptr_type& cookie,
                               const OperationContextPtr& operationContext,
                               const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                               const ::std::string& destination, 
diff --git a/src/RouteSessionOperation.h b/src/RouteSessionOperation.h
index f6b6fc0..a665e7a 100644
--- a/src/RouteSessionOperation.h
+++ b/src/RouteSessionOperation.h
@@ -66,7 +66,7 @@ public:
     /**
      * Factory method for the class. This method creates an active routing operation. 
      */
-    static RouteSessionOperationPtr create(const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_routeSessionPtr>::Ptr& cookie,
+    static RouteSessionOperationPtr create(const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_routeSessionPtr>::ptr_type& cookie,
                                            const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
                                            const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                                            const ::std::string& destination, 
@@ -107,7 +107,7 @@ public:
 
 protected:
     // Normal constructor
-    RouteSessionOperation(const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_routeSessionPtr>::Ptr& cookie,
+    RouteSessionOperation(const AsteriskSCF::Operations::AMDContextData<AsteriskSCF::SessionCommunications::V1::AMD_SessionRouter_routeSessionPtr>::ptr_type& cookie,
                           const AsteriskSCF::System::V1::OperationContextPtr& operationContext,                          
                           const ::AsteriskSCF::SessionCommunications::V1::SessionPrx& source, 
                           const ::std::string& destination, 
diff --git a/src/SessionRouter.cpp b/src/SessionRouter.cpp
index 19925c1..3ab30b2 100644
--- a/src/SessionRouter.cpp
+++ b/src/SessionRouter.cpp
@@ -177,8 +177,8 @@ void SessionRouter::routeSession_async(const AMD_SessionRouter_routeSessionPtr&
                                        const ::Ice::Current& current)
 {
 
-    boost::shared_ptr<AMDContextData<AMD_SessionRouter_routeSessionPtr> > cookie = 
-        getContext<boost::shared_ptr<AMDContextData<AMD_SessionRouter_routeSessionPtr> >, AMD_SessionRouter_routeSessionPtr>(
+    AMDContextData<AMD_SessionRouter_routeSessionPtr>::ptr_type cookie = 
+        getContext<AMDContextData<AMD_SessionRouter_routeSessionPtr>::ptr_type, AMD_SessionRouter_routeSessionPtr>(
             mImpl->mOperationContextCache,
             operationContext,
             cb);
@@ -231,8 +231,8 @@ void SessionRouter::connectBridgedSessionsWithDestination_async(const AMD_Sessio
                                                                 const SessionCreationHookPrx& oneShotHook,
                                                                 const ::Ice::Current& current)
 {
-    boost::shared_ptr<AMDContextData<AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr> > cookie = 
-        getContext<boost::shared_ptr<AMDContextData<AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr> >, AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>(
+    AMDContextData<AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::ptr_type cookie = 
+        getContext<AMDContextData<AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>::ptr_type, AMD_SessionRouter_connectBridgedSessionsWithDestinationPtr>(
             mImpl->mOperationContextCache,
             operationContext,
             cb);
@@ -276,8 +276,8 @@ void SessionRouter::connectBridgedSessions_async(const ::AsteriskSCF::SessionCom
                                                  bool replaceSession,
                                                  const ::Ice::Current& current)
 {
-    boost::shared_ptr<AMDContextData<AMD_SessionRouter_connectBridgedSessionsPtr> > cookie = 
-        getContext<boost::shared_ptr<AMDContextData<AMD_SessionRouter_connectBridgedSessionsPtr> >, AMD_SessionRouter_connectBridgedSessionsPtr>(
+    AMDContextData<AMD_SessionRouter_connectBridgedSessionsPtr>::ptr_type cookie = 
+        getContext<AMDContextData<AMD_SessionRouter_connectBridgedSessionsPtr>::ptr_type, AMD_SessionRouter_connectBridgedSessionsPtr>(
             mImpl->mOperationContextCache,
             operationContext,
             cb);
diff --git a/src/SessionRouterOperation.h b/src/SessionRouterOperation.h
index 417b6b3..8db9915 100644
--- a/src/SessionRouterOperation.h
+++ b/src/SessionRouterOperation.h
@@ -122,7 +122,7 @@ public:
      *  @param manager 
      *  @param defaultState The initial state of the operation's state machine.
      */
-    SessionRouterOperation(const typename AsteriskSCF::Operations::AMDContextData<T>::Ptr& cookie,
+    SessionRouterOperation(const typename AsteriskSCF::Operations::AMDContextData<T>::ptr_type& cookie,
                            const AsteriskSCF::System::V1::OperationContextPtr& operationContext,
                            const SessionContextPtr& context,
                            const ::Ice::Current& current,
@@ -312,7 +312,7 @@ public:
     /** 
      * Sets a replicated operation's non-replicated state related to the specific host process. 
      */
-    void rehostReplica(const typename AsteriskSCF::Operations::AMDContextData<T>::Ptr& cookie, const ::Ice::Current& current, OperationsManager* manager)
+    void rehostReplica(const typename AsteriskSCF::Operations::AMDContextData<T>::ptr_type& cookie, const ::Ice::Current& current, OperationsManager* manager)
     {
         mCookie = cookie;
         mIceCurrent = current;
@@ -330,7 +330,7 @@ public:
     }
 
 protected:
-    typename AsteriskSCF::Operations::AMDContextData<T>::Ptr mCookie;
+    typename AsteriskSCF::Operations::AMDContextData<T>::ptr_type mCookie;
     AsteriskSCF::System::V1::OperationContextPtr mOperationContext;
     SessionContextPtr mSessionContext;
     ::Ice::Current mIceCurrent;

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


-- 
asterisk-scf/integration/routing.git



More information about the asterisk-scf-commits mailing list