[Opendnssec-commits] matthijs r6972 - releases/OpenDNSSEC-1.3.12/signer/src/daemon

commits at svn.opendnssec.org commits at svn.opendnssec.org
Wed Jan 23 15:47:39 CET 2013


Author: matthijs
Date: Wed Jan 23 15:47:39 2013
New Revision: 6972
URL: http://fisheye.opendnssec.org/changelog/opendnssec?cs=6972

Log:
always check for max backoff

Modified:
   releases/OpenDNSSEC-1.3.12/signer/src/daemon/worker.c

Modified: releases/OpenDNSSEC-1.3.12/signer/src/daemon/worker.c
==============================================================================
--- releases/OpenDNSSEC-1.3.12/signer/src/daemon/worker.c	Wed Jan 23 13:21:12 2013	(r6971)
+++ releases/OpenDNSSEC-1.3.12/signer/src/daemon/worker.c	Wed Jan 23 15:47:39 2013	(r6972)
@@ -477,12 +477,12 @@
 
     if (task->backoff) {
         task->backoff *= 2;
-        if (task->backoff > ODS_SE_MAX_BACKOFF) {
-            task->backoff = ODS_SE_MAX_BACKOFF;
-        }
     } else {
         task->backoff = 60;
     }
+    if (task->backoff > ODS_SE_MAX_BACKOFF) {
+        task->backoff = ODS_SE_MAX_BACKOFF;
+    }
     ods_log_info("[%s[%i]] backoff task %s for zone %s with %u seconds",
         worker2str(worker->type), worker->thread_num,
         task_what2str(task->what), task_who2str(task->who), task->backoff);
@@ -570,9 +570,9 @@
                 timeout = (worker->task->when - now);
             } else {
                 timeout *= 2;
-                if (timeout > ODS_SE_MAX_BACKOFF) {
-                    timeout = ODS_SE_MAX_BACKOFF;
-                }
+            }
+            if (timeout > ODS_SE_MAX_BACKOFF) {
+                timeout = ODS_SE_MAX_BACKOFF;
             }
             worker->task = NULL;
             worker_sleep(worker, timeout);



More information about the Opendnssec-commits mailing list