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

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Apr 4 14:36:02 CDT 2012


branch "retry_deux" has been updated
       via  c51039745464e204ba2ba63bbb595035fb64fb7d (commit)
      from  39d7496a81d17eec4845d2ddb2be2eb9f286b5d5 (commit)

Summary of changes:
 src/Component.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


- Log -----------------------------------------------------------------
commit c51039745464e204ba2ba63bbb595035fb64fb7d
Author: David M. Lee <dlee at digium.com>
Date:   Wed Apr 4 13:51:41 2012 -0500

    Replace ValueOperationContextCookie with ContextResultData

diff --git a/src/Component.cpp b/src/Component.cpp
index 7bab1b3..11557ad 100644
--- a/src/Component.cpp
+++ b/src/Component.cpp
@@ -33,6 +33,7 @@
 #include <AsteriskSCF/Component/Component.h>
 #include <AsteriskSCF/Operations/OperationContext.h>
 #include <AsteriskSCF/Operations/OperationContextCache.h>
+#include <AsteriskSCF/Operations/OperationMonitor.h>
 
 #include "UdptlReplicationContext.h"
 #include "UDPTLSession.h"
@@ -63,7 +64,7 @@ const string ReplicaServiceId("MediaUdptlReplica");
 const string MediaServiceId("UDPTLMediaService");
 const int TTL_SECONDS = 180;
 
-typedef ValueOperationContextCookieWithLock<UDPTLSessionPrx> UDPTLSessionPrxCookie;
+typedef ContextResultData<UDPTLSessionPrx> UDPTLSessionPrxCookie;
 
 typedef boost::shared_ptr<UDPTLSessionPrxCookie> UDPTLSessionPrxCookiePtr;
 }
@@ -89,19 +90,18 @@ public:
         const UDPTLServiceLocatorParamsPtr& params, const Ice::Current&)
     {
         std::pair<bool, UDPTLSessionPrxCookiePtr> cacheHit =
-            testOrSetAndLock<UDPTLSessionPrxCookie>(mOperationContextCache, operationContext);
-        boost::mutex::scoped_lock lock(cacheHit.second->getMutex(), boost::adopt_lock);
+            getContextSync<UDPTLSessionPrxCookiePtr>(mOperationContextCache, operationContext);
 
         if (cacheHit.first)
         {
-            return cacheHit.second->get();
+            return cacheHit.second->getResult();
         }
 
         try
         {
             UDPTLSessionPrx r = AsteriskSCF::UDPTL::UDPTLSession::create(mAdapter, IceUtil::generateUUID(),
                 mEnvironment, params, mReplicationContext, mConfigurationService);
-            cacheHit.second->set(r);
+            cacheHit.second->setResult(r);
             return r;
         }
         catch (const std::exception& e)

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


-- 
asterisk-scf/integration/mediatransportudptl.git



More information about the asterisk-scf-commits mailing list