[Opendnssec-commits] yuri r7050 - in branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src: . scheduler

commits at svn.opendnssec.org commits at svn.opendnssec.org
Thu Feb 21 11:03:38 CET 2013


Author: yuri
Date: Thu Feb 21 11:03:38 2013
New Revision: 7050
URL: http://fisheye.opendnssec.org/changelog/opendnssec?cs=7050

Log:
increase daemon/client verbosity
fix warning

Modified:
   branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/ods-enforcer.c
   branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/ods-enforcerd.c
   branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/scheduler/task.c

Modified: branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/ods-enforcer.c
==============================================================================
--- branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/ods-enforcer.c	Wed Feb 20 16:12:41 2013	(r7049)
+++ branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/ods-enforcer.c	Thu Feb 21 11:03:38 2013	(r7050)
@@ -276,7 +276,7 @@
     sockfd = socket(AF_UNIX, SOCK_STREAM, 0);
     if (sockfd <= 0) {
         fprintf(stderr, "Unable to connect to engine. "
-            "socket() failed: %s\n", strerror(errno));
+            "socket() failed: %s (\"%s\")\n", strerror(errno), servsock_filename);
         return 1;
     }
 
@@ -297,8 +297,8 @@
         if (cmd && ods_strcmp(cmd, "running\n") == 0) {
             fprintf(stderr, "Engine not running.\n");
         } else {
-            fprintf(stderr, "Unable to connect to engine: "
-                "connect() failed: %s\n", strerror(errno));
+        fprintf(stderr, "Unable to connect to engine. "
+            "socket() failed: %s (\"%s\")\n", strerror(errno), servsock_filename);
         }
 
         close(sockfd);

Modified: branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/ods-enforcerd.c
==============================================================================
--- branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/ods-enforcerd.c	Wed Feb 20 16:12:41 2013	(r7049)
+++ branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/ods-enforcerd.c	Thu Feb 21 11:03:38 2013	(r7050)
@@ -282,7 +282,10 @@
         if ((engine = engine_start(cfgfile, cmdline_verbosity, daemonize, info))) {
             engine_setup(engine,enforcer_commands,enforcer_help);
             /* if setup fails we need a non-zero exit code */
-            if (engine->need_to_exit) exit(3);
+            if (engine->need_to_exit) {
+                fprintf(stdout, "Setup failed. Aborting.\n");
+                exit(3);
+            }
             engine_runloop(engine,autostart,single_run);
             engine_stop(engine);
         }

Modified: branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/scheduler/task.c
==============================================================================
--- branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/scheduler/task.c	Wed Feb 20 16:12:41 2013	(r7049)
+++ branches/OpenDNSSEC-enforcer-ng/enforcer-ng/src/scheduler/task.c	Thu Feb 21 11:03:38 2013	(r7050)
@@ -67,7 +67,7 @@
 
 static const char *task_id_to_short_name(task_id id, const char *def)
 {
-    if (id >= TASK_DYNAMIC_FIRST && id-TASK_DYNAMIC_FIRST < ntaskreg) {
+    if (id >= TASK_DYNAMIC_FIRST && (signed)id-TASK_DYNAMIC_FIRST < ntaskreg) {
         return taskreg[id-TASK_DYNAMIC_FIRST].short_name;
     }
     return def;
@@ -75,7 +75,7 @@
 
 static bool task_id_to_how(task_id id, how_type *phow)
 {
-    if (id >= TASK_DYNAMIC_FIRST && id-TASK_DYNAMIC_FIRST < ntaskreg) {
+    if (id >= TASK_DYNAMIC_FIRST && (signed)id-TASK_DYNAMIC_FIRST < ntaskreg) {
         *phow = taskreg[id-TASK_DYNAMIC_FIRST].how;
         return true;
     }



More information about the Opendnssec-commits mailing list