[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 Jan 18 16:37:06 CST 2012


branch "retry_deux" has been updated
       via  744a068b60119bdec7fa9d26cadd856db1cd0fc1 (commit)
      from  7c49b6b4767c55addec761e35de7693615ea9475 (commit)

Summary of changes:
 include/AsteriskSCF/Helpers/Retry.h |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 744a068b60119bdec7fa9d26cadd856db1cd0fc1
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Wed Jan 18 16:37:03 2012 -0600

    Incorporated review feedback.

diff --git a/include/AsteriskSCF/Helpers/Retry.h b/include/AsteriskSCF/Helpers/Retry.h
index 2bb2622..bcaa2f7 100644
--- a/include/AsteriskSCF/Helpers/Retry.h
+++ b/include/AsteriskSCF/Helpers/Retry.h
@@ -63,13 +63,19 @@ public:
     /**
      * Sleep for the configured interval.
      *
-     * @returns true if there are attempts left.
+     * @returns true if this operation performed a sleep. 
+     *  Indicates the caller should attempt a retry.
      **/
     bool retry()
     {
+        if (canRetry() == false)
+        {
+            return false;
+        }
+
         IceUtil::ThreadControl::sleep(mRetryInterval);
         ++mCounter;
-        return canRetry();
+        return true;
     }
 
     size_t getMaxRetries() const

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


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



More information about the asterisk-scf-commits mailing list