From: Dave Hart Date: Tue, 30 Aug 2011 09:01:00 +0000 (+0000) Subject: Require -D4 or higher for ntpd SIGALRM debug trace from [Bug 2000]. X-Git-Tag: NTP_4_2_7P210~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=877ff89ec914a721e432dc3ab11a0194eeacaab6;p=thirdparty%2Fntp.git Require -D4 or higher for ntpd SIGALRM debug trace from [Bug 2000]. bk: 4e5ca6cc0ioDacgeeT73T-EbX1tVkg --- diff --git a/ChangeLog b/ChangeLog index 8e964e357..509a3c530 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,4 @@ +* Require -D4 or higher for ntpd SIGALRM debug trace from [Bug 2000]. (4.2.7p209) 2011/08/27 Released by Harlan Stenn * [Bug 2000] ntpd worker threads must block signals expected in main thread. diff --git a/ntpd/ntp_timer.c b/ntpd/ntp_timer.c index ece53dd04..cb291ff12 100644 --- a/ntpd/ntp_timer.c +++ b/ntpd/ntp_timer.c @@ -449,16 +449,16 @@ alarming( int sig ) { -#ifdef DEBUG +# ifdef DEBUG const char *msg = "alarming: initializing TRUE\n"; -#endif +# endif if (!initializing) { if (alarm_flag) { alarm_overflow++; -#ifdef DEBUG +# ifdef DEBUG msg = "alarming: overflow\n"; -#endif +# endif } else { # ifndef VMS alarm_flag++; @@ -466,19 +466,19 @@ alarming( /* VMS AST routine, increment is no good */ alarm_flag = 1; # endif -#ifdef DEBUG +# ifdef DEBUG msg = "alarming: normal\n"; -#endif +# endif } } # ifdef VMS lib$addx(&vmsinc, &vmstimer, &vmstimer); sys$setimr(0, &vmstimer, alarming, alarming, 0); # endif -#ifdef DEBUG - if (debug) - write(2, msg, strlen(msg)); -#endif +# ifdef DEBUG + if (debug >= 4) + write(1, msg, strlen(msg)); +# endif } #endif /* SYS_WINNT */