[Opendnssec-commits] [svn.opendnssec.org/svn/dnssec] r5429 - branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer

Yuri Schaeffer yuri at keihatsu.kirei.se
Fri Aug 19 14:51:10 CEST 2011


Author: yuri
Date: 2011-08-19 14:51:10 +0200 (Fri, 19 Aug 2011)
New Revision: 5429

Modified:
   branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforce_cmd.cpp
   branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforce_task.cpp
Log:
- Wakeup threads after 'enforce --task' command.
- Do not discard tasks asking to be scheduled in the 
  past. Schedule them time_now() (To not disrupt the
  time leap functionality).


Modified: branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforce_cmd.cpp
===================================================================
--- branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforce_cmd.cpp	2011-08-18 11:53:11 UTC (rev 5428)
+++ branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforce_cmd.cpp	2011-08-19 12:51:10 UTC (rev 5429)
@@ -71,6 +71,7 @@
                 (void)snprintf(buf, ODS_SE_MAXLINE,
                                "Scheduled %s generator task.\n",scmd);
                 ods_writen(sockfd, buf, strlen(buf));
+		engine_wakeup_workers(engine);
             }
         }
     } else {

Modified: branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforce_task.cpp
===================================================================
--- branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforce_task.cpp	2011-08-18 11:53:11 UTC (rev 5428)
+++ branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/enforcer/enforce_task.cpp	2011-08-19 12:51:10 UTC (rev 5429)
@@ -143,12 +143,6 @@
 
         if (t_next == -1)
             continue;
-        
-        if (t_next < time_now()) {
-            ods_log_error("[%s] enforcer asked to be scheduled in the past for "
-                          "zone %s", module_str, ks_zone.name().c_str());
-            continue;
-        }
 
         // If this enforcer wants a reschedule earlier than currently
         // set, then use that.
@@ -219,7 +213,7 @@
     delete keystateDoc;
     delete hsmkeyDoc;
 
-    return t_when;
+    return std::max(t_when, time_now());
 }
 
 static task_type *




More information about the Opendnssec-commits mailing list