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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Apr 11 10:07:50 CDT 2012


branch "retry_deux" has been updated
       via  6dc85291730636e40a52f954cf6479e9a2447968 (commit)
      from  9b62490fe79e51d4fb804c0ccbe8ce75875ba0df (commit)

Summary of changes:
 .../BridgeService/BridgeReplicatorIf.ice           |   24 ------------
 src/BridgeManagerImpl.cpp                          |   40 --------------------
 src/BridgeManagerImpl.h                            |    3 -
 src/BridgeReplicatorStateListenerI.cpp             |   24 ------------
 4 files changed, 0 insertions(+), 91 deletions(-)


- Log -----------------------------------------------------------------
commit 6dc85291730636e40a52f954cf6479e9a2447968
Author: Brent Eagles <beagles at digium.com>
Date:   Wed Apr 11 12:37:13 2012 -0230

    Removed special context state item that turns out to currently not be
    really necessary.

diff --git a/slice/AsteriskSCF/Replication/BridgeService/BridgeReplicatorIf.ice b/slice/AsteriskSCF/Replication/BridgeService/BridgeReplicatorIf.ice
index 29d974f..8fc042d 100644
--- a/slice/AsteriskSCF/Replication/BridgeService/BridgeReplicatorIf.ice
+++ b/slice/AsteriskSCF/Replication/BridgeService/BridgeReplicatorIf.ice
@@ -86,30 +86,6 @@ enum MediaOperationReplicationPolicy
  */
 
 /**
- * Context replication constants. The values indicate the method that
- * received the incoming context.
- */
-enum ContextCodes
-{
-    CreateBridge,
-    AddSession,
-    ReplaceSession,
-    RemoveSession,
-    Shutdown
-};
-
-/**
- * State item for replicating incoming contexts for key
- * operations. Typically these are only replicted when an interface method
- * has a broad range of side-effects that are difficult to recover from.
- */
-class ContextStateItem extends ReplicatedStateItem
-{
-    ContextCodes code;
-    AsteriskSCF::System::V1::OperationContext operationContext;
-};
-
-/**
  *
  * A bridge establishes connections between media objects associated with sessions.
  * Most sessions will have a media session associated with it that will be connected
diff --git a/src/BridgeManagerImpl.cpp b/src/BridgeManagerImpl.cpp
index 508aca5..44f2bb7 100755
--- a/src/BridgeManagerImpl.cpp
+++ b/src/BridgeManagerImpl.cpp
@@ -113,8 +113,6 @@ public:
         return mName;
     }
 
-    void newCreateBridgeContext(const ContextStateItemPtr& contextItem);
-
     void createBridgeReplica(const BridgeStateItemPtr& bridgeState);
 
     void removeBridge(const string& bridgeState);
@@ -262,14 +260,6 @@ void BridgeManagerImpl::createBridge_async(const AMD_BridgeManager_createBridgeP
     bool replicaRetry = data.first && (data.second->callbackCount() == 0);
 
     //
-    // If addCB returns true, then the operation had already completed and we can simply return.
-    //
-    if (data.second->addCB(callback))
-    {
-        return;
-    }
-
-    //
     // If we've figured that we are replica retry or we weren't in the
     // cache, then we need to run through this stuff again.
     //
@@ -283,30 +273,6 @@ void BridgeManagerImpl::createBridge_async(const AMD_BridgeManager_createBridgeP
     //
     if (replicaRetry || !data.first)
     {
-        //
-        // At this point, we should be the first and only thread for the
-        // specific context.
-        //
-        AsteriskSCF::Replication::BridgeService::V1::ContextStateItemPtr contextState;
-        if (!replicaRetry)
-        {
-            contextState = new AsteriskSCF::Replication::BridgeService::V1::ContextStateItem;
-            contextState->key = context->id + context->transactionId;
-            contextState->serial = AsteriskSCF::Replication::BridgeService::V1::SerialCounterStart;
-            contextState->code = AsteriskSCF::Replication::BridgeService::V1::CreateBridge;
-            contextState->operationContext = context;
-            if (mReplicationContext->isReplicating())
-            {
-                ReplicatedStateItemSeq seq;
-                seq.push_back(contextState);
-                mReplicationContext->getReplicator()->setState(AsteriskSCF::Operations::createContext(context), seq);
-                //
-                // Now the replicas have a record that this thing has started.
-                //
-            }
-        }
-        
-        
         try
         {
             mLogger(Trace) << FUNLOG << ":" << objectIdFromCurrent(current);
@@ -855,12 +821,6 @@ void BridgeManagerImpl::activate(const AsteriskSCF::Core::Discovery::V1::Service
     mCreationExtensionPointServicePrx->addLocatorParams(AsteriskSCF::Operations::createContext(), params, "");
 }
 
-void BridgeManagerImpl::newCreateBridgeContext(const ContextStateItemPtr& context)
-{
-    std::pair<bool, CreateBridgeContextDataPtr> data(
-        getContextSync<CreateBridgeContextDataPtr>(mOperationCache, context->operationContext));
-}
-
 void BridgeManagerImpl::createBridgeReplica(const BridgeStateItemPtr& state)
 {
     std::pair<bool, CreateBridgeContextDataPtr> data(
diff --git a/src/BridgeManagerImpl.h b/src/BridgeManagerImpl.h
index 885a51b..b07fa12 100644
--- a/src/BridgeManagerImpl.h
+++ b/src/BridgeManagerImpl.h
@@ -54,9 +54,6 @@ public:
 
     virtual std::string getID() = 0;
 
-    virtual void newCreateBridgeContext(
-        const AsteriskSCF::Replication::BridgeService::V1::ContextStateItemPtr& context) = 0;
-
     virtual void createBridgeReplica(
         const AsteriskSCF::Replication::BridgeService::V1::BridgeStateItemPtr& bridgeState) = 0;
 
diff --git a/src/BridgeReplicatorStateListenerI.cpp b/src/BridgeReplicatorStateListenerI.cpp
index 06975bc..44169ea 100644
--- a/src/BridgeReplicatorStateListenerI.cpp
+++ b/src/BridgeReplicatorStateListenerI.cpp
@@ -332,30 +332,6 @@ public:
                 continue;
             }
 
-            ContextStateItemPtr contextItem = ContextStateItemPtr::dynamicCast((*i));
-            if (contextItem)
-            {
-                switch(contextItem->code)
-                {
-                    case CreateBridge:
-                        mManager->newCreateBridgeContext(contextItem);
-                        break;
-                    case AddSession:
-                        break;
-                    case ReplaceSession:
-                        break;
-                    case RemoveSession:
-                        break;
-                    case Shutdown:
-                        break;
-                    default:
-                        mLogger(Error) << "Received a replicated context item with an unknown code, "
-                            "possible implementation mismatch or corrupted data from active component. Please "
-                            "contact support.";
-                }
-                continue;
-            }
-
             mLogger(Error) << "Bridge replicator service received an unrecognized replication item: " << (*i)->ice_id();
         }
     }

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


-- 
asterisk-scf/integration/bridging.git



More information about the asterisk-scf-commits mailing list