Antwort: [Nagios-checkins] nagios/base checks.c, 1.170, 1.171 nagios.c, 1.172, 1.173 utils.c, 1.245, 1.246
Sascha.Runschke at gfkl.com
Sascha.Runschke at gfkl.com
Wed Aug 12 09:48:49 CEST 2009
Ethan Galstad <egalstad at users.sourceforge.net> schrieb am 11.08.2009
18:53:06:
> Index: nagios.c
> ===================================================================
> RCS file: /cvsroot/nagios/nagios/base/nagios.c,v
> retrieving revision 1.172
> retrieving revision 1.173
> diff -C2 -d -r1.172 -r1.173
> *** nagios.c 31 Jul 2009 16:54:20 -0000 1.172
> --- nagios.c 11 Aug 2009 16:53:04 -0000 1.173
> ***************
> *** 607,610 ****
> --- 607,625 ----
> }
>
> + #undef TEST_TIMEPERIODS
> + #ifdef TEST_TIMEPERIODS
> + /* DO SOME TIMEPERIOD TESTING - ADDED 08/11/2009 */
> + time_t now, pref_time, valid_time;
> + timeperiod *tp;
> + tp=find_timeperiod("247_exclusion");
> + time(&now);
> + pref_time=now;
> + get_next_valid_time(pref_time,&valid_time,tp);
> + printf("=====\n");
> + printf("CURRENT: %lu = %s",(unsigned long)now,ctime(&now));
> + printf("PREFERRED: %lu = %s",(unsigned long)pref_time,ctime
> (&pref_time));
> + printf("NEXT: %lu = %s",(unsigned long)valid_time,ctime
> (&valid_time));
> + printf("=====\n");
> + #endif
Hi Ethan!
Am I totally blind or is this just a little bit weired code?
If you #undef TEST_TIMEPERIODS, there is no real sense in doing an
#ifdef TEST_TIMEPERIODS on the next line, or is there?
The compiler will optimize it out anyways.
Or is my C-foo blinded by the fact it's 9am and I didn't have my
second coffee yet? ;-)
Regards
Sascha
GFKL Financial Services AG
Vorstand: Dr. Peter Jänsch (Vors.), Jürgen Baltes, Dr. Tom Haverkamp
Vorsitzender des Aufsichtsrats: Dr. Georg F. Thoma
Sitz: Limbecker Platz 1, 45127 Essen, Amtsgericht Essen, HRB 13522
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20090812/8afca0bb/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list