[asterisk-scf-commits] asterisk-scf/integration/ice-util-cpp.git branch "retry_deux" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed Apr 11 12:58:25 CDT 2012


branch "retry_deux" has been updated
       via  f1afa498a99b83ad09ccd0c7b224eaea56707124 (commit)
      from  8ea5ef0b12e46816baf435e068799e1ef9611e73 (commit)

Summary of changes:
 include/AsteriskSCF/Operations/OperationMonitor.h |   32 ---------------------
 1 files changed, 0 insertions(+), 32 deletions(-)


- Log -----------------------------------------------------------------
commit f1afa498a99b83ad09ccd0c7b224eaea56707124
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Wed Apr 11 12:52:56 2012 -0500

    Settled on a single getContext function.

diff --git a/include/AsteriskSCF/Operations/OperationMonitor.h b/include/AsteriskSCF/Operations/OperationMonitor.h
index 09c1643..b25eeba 100755
--- a/include/AsteriskSCF/Operations/OperationMonitor.h
+++ b/include/AsteriskSCF/Operations/OperationMonitor.h
@@ -568,35 +568,6 @@ ASTSCF_DLL_EXPORT std::pair<bool, DT> getContextSync(const AsteriskSCF::Operatio
  * If the context is not in the cache, a new cookie is created, the amdCallback is added to it, and the
  * new cookie is returned. The caller then needs to complete normal execution, and either setException() or
  * setResult() on the cookie when finished.
- */
-template <class DT, class AT>
-ASTSCF_DLL_EXPORT DT getContext(const AsteriskSCF::Operations::OperationContextCachePtr& cache,
-    const AsteriskSCF::System::V1::OperationContextPtr& context,
-    const AT& amdCallback)
-{
-    std::pair<bool, DT> cacheHit = getContextSync<DT>(cache, context);
-
-    cacheHit.second->addCB(amdCallback);
-
-    if (cacheHit.first)
-    {
-        return DT();
-    }
-    else
-    {
-        return cacheHit.second;
-    }
-}
-
-/**
- * Gets a OperationContextCookie subclass for a given context, creating it if necessary.
- *
- * If the context is already in the cache, the amdCallback is added to the existing cookie and null is
- * returned; nothing else need be done.
- *
- * If the context is not in the cache, a new cookie is created, the amdCallback is added to it, and the
- * new cookie is returned. The caller then needs to complete normal execution, and either setException() or
- * setResult() on the cookie when finished.
  *
  * NOTE: This version assumes the cookie type T is either an instance of AMDContextResultData or AMDContextData. 
  * It uses the exposed callback_type and ptr_type. It needs a test. 
@@ -612,9 +583,6 @@ ASTSCF_DLL_EXPORT typename T::ptr_type getContext(const AsteriskSCF::Operations:
 
     cacheHit.second->addCB(amdCallback);
 
-    typename T::ptr_type c(new T);
-    AsteriskSCF::Operations::OperationContextCookiePtr o;
-
     if (cacheHit.first)
     {
         return T::ptr_type();

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


-- 
asterisk-scf/integration/ice-util-cpp.git



More information about the asterisk-scf-commits mailing list