* amd/get_args.c (get_args): initialize debug_flags if they've
authorErez Zadok <ezk@cs.sunysb.edu>
Tue, 16 Aug 2005 17:10:39 +0000 (17:10 +0000)
committerErez Zadok <ezk@cs.sunysb.edu>
Tue, 16 Aug 2005 17:10:39 +0000 (17:10 +0000)
never been set.

ChangeLog
amd/get_args.c
libamu/xutil.c

index e2061ab506cf13933c86642f7bf456e252edbc15..6fad6335c9b5b6adbc309b2d2de1032fa6a5c37e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-16  Erez Zadok  <ezk@cs.sunysb.edu>
+
+       * amd/get_args.c (get_args): initialize debug_flags if they've
+       never been set.
+
 2005-08-15  Erez Zadok  <ezk@cs.sunysb.edu>
 
        * amd/mapc.c (mapc_create): mapc find takes 4th arg, the mount
index 63af73c029d522ab8ab92bb55d94a8c24ad53631..ee8b9e7bc54cf8a005f2ba0bcb67e522864de45f 100644 (file)
@@ -339,6 +339,9 @@ get_args(int argc, char *argv[])
 
 #ifdef DEBUG
   usage += switch_option("debug");
+  /* initialize debug options */
+  if (!debug_flags)
+    debug_flags = D_CONTROL;   /* CONTROL = "daemon,amq,fork" */
 #endif /* DEBUG */
 
   /* log information regarding amd.conf file */
index 68fa15374b37acb90c90e2f1a8bff69e816cbe29..b0201041b8dc2a7e3122652a3610e9ad7c036a36 100644 (file)
@@ -60,7 +60,7 @@ pid_t am_mypid = -1;          /* process ID */
 serv_state amd_state;          /* amd's state */
 int foreground = 1;            /* 1 == this is the top-level server */
 #ifdef DEBUG
-u_int debug_flags = 0;
+u_int debug_flags = 0;         /* 0 == uninitialized (get_args will init) */
 #else /* not DEBUG */
 u_int debug_flags = D_CONTROL; /* default when not compiled with debugging */
 #endif /* not DEBUG */