From: Erez Zadok Date: Tue, 16 Aug 2005 17:10:39 +0000 (+0000) Subject: * amd/get_args.c (get_args): initialize debug_flags if they've X-Git-Tag: before-clocktime-fixes~22 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=ed1ee835b00daf89caddb2f0e39a1ca07b0339d6;p=am-utils-6.0.git * amd/get_args.c (get_args): initialize debug_flags if they've never been set. --- diff --git a/ChangeLog b/ChangeLog index e2061ab..6fad633 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-16 Erez Zadok + + * amd/get_args.c (get_args): initialize debug_flags if they've + never been set. + 2005-08-15 Erez Zadok * amd/mapc.c (mapc_create): mapc find takes 4th arg, the mount diff --git a/amd/get_args.c b/amd/get_args.c index 63af73c..ee8b9e7 100644 --- a/amd/get_args.c +++ b/amd/get_args.c @@ -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 */ diff --git a/libamu/xutil.c b/libamu/xutil.c index 68fa153..b020104 100644 --- a/libamu/xutil.c +++ b/libamu/xutil.c @@ -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 */