Nagios 3 Patch xpddefault.c
Joerg Linge
pitchfork at ederdrom.de
Tue Mar 6 12:45:56 CET 2007
Hi Ethan, Hi List
If the host_perfdata_file_processing_command is executed, the filehandle for service_perfdata_file is also closed and reopened.
So the host_perfdata_file_processing_command also truncates the service_perfdata_file.
Jörg
--- xpddefault.c.orig 2007-03-01 19:19:17.000000000 +0100
+++ xpddefault.c 2007-03-06 12:39:00.000000000 +0100
@@ -716,9 +716,8 @@
if(xpddefault_host_perfdata_file_processing_command==NULL)
return OK;
- /* close the performance data files */
+ /* close the host performance data file */
xpddefault_close_host_perfdata_file();
- xpddefault_close_service_perfdata_file();
/* update macros */
clear_volatile_macros();
@@ -750,8 +749,7 @@
my_free((void **)&temp_buffer);
}
- /* re-open the performance data files */
- xpddefault_open_service_perfdata_file();
+ /* re-open the host performance data file */
xpddefault_open_host_perfdata_file();
return result;
@@ -772,8 +770,7 @@
if(xpddefault_service_perfdata_file_processing_command==NULL)
return OK;
- /* close the performance data files */
- xpddefault_close_host_perfdata_file();
+ /* close the service performance data file */
xpddefault_close_service_perfdata_file();
/* update macros */
@@ -806,9 +803,8 @@
my_free((void **)&temp_buffer);
}
- /* re-open the performance data files */
+ /* re-open the service performance data file */
xpddefault_open_service_perfdata_file();
- xpddefault_open_host_perfdata_file();
return result;
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
More information about the Developers
mailing list