Update of /cvsroot/nagios/nagios/base
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18164/base
Modified Files:
checks.c
Log Message:
Init script improvements, minor improvements to freshness checking
Index: checks.c
===================================================================
RCS file: /cvsroot/nagios/nagios/base/checks.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -C2 -d -r1.76 -r1.77
*** checks.c 6 Jun 2005 03:20:57 -0000 1.76
--- checks.c 10 Nov 2005 23:14:26 -0000 1.77
***************
*** 4,8 ****
*
* Copyright (c) 1999-2005 Ethan Galstad (nagios@xxxxxxxxxx)
! * Last Modified: 04-30-2005
*
* License:
--- 4,8 ----
*
* Copyright (c) 1999-2005 Ethan Galstad (nagios@xxxxxxxxxx)
! * Last Modified: 11-10-2005
*
* License:
***************
*** 1673,1679 ****
#endif
! #undef TEST_FRESHNESS
#ifdef TEST_FRESHNESS
printf("CHECKFRESHNESS 1\n");
#endif
--- 1673,1680 ----
#endif
! #define TEST_FRESHNESS 1
#ifdef TEST_FRESHNESS
+ printf("\n======FRESHNESS START======\n");
printf("CHECKFRESHNESS 1\n");
#endif
***************
*** 1737,1741 ****
/* calculate expiration time */
! if(temp_service->has_been_checked==FALSE ||
program_start>temp_service->last_check)
expiration_time=(time_t)(program_start+freshness_threshold);
else
--- 1738,1743 ----
/* calculate expiration time */
! /* CHANGED 11/10/05 EG - program start is only used in
expiration time calculation if > last check AND active checks are enabled, so
active checks can become stale immediately upon program startup */
! if(temp_service->has_been_checked==FALSE ||
(temp_service->checks_enabled==TRUE && program_start>temp_service->last_check))
expiration_time=(time_t)(program_start+freshness_threshold);
else
***************
*** 1766,1769 ****
--- 1768,1775 ----
}
+ #ifdef TEST_FRESHNESS
+ printf("\n======FRESHNESS END======\n");
+ #endif
+
#ifdef DEBUG0
printf("check_service_result_freshness() end\n");
***************
*** 1963,1967 ****
/* calculate expiration time */
! if(temp_host->has_been_checked==FALSE)
expiration_time=(time_t)(program_start+freshness_threshold);
else
--- 1969,1974 ----
/* calculate expiration time */
! /* CHANGED 11/10/05 EG - program start is only used in
expiration time calculation if > last check AND active checks are enabled, so
active checks can become stale immediately upon program startup */
! if(temp_host->has_been_checked==FALSE ||
(temp_host->checks_enabled==TRUE && (program_start>temp_host->last_check)))
expiration_time=(time_t)(program_start+freshness_threshold);
else
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
|