[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: core: remove duplicated unlinks for check result files with multiple results #1615

git at icinga.org git at icinga.org
Sat Jun 4 13:03:34 CEST 2011


Module: icinga-core
Branch: mfriedrich/core
Commit: 96cea6779752a9a7b569b18941998339b102b678
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=96cea6779752a9a7b569b18941998339b102b678

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sat Jun  4 12:30:09 2011 +0200

core: remove duplicated unlinks for check result files with multiple results #1615

refs #1615

---

 Changelog     |    2 ++
 base/checks.c |   10 ----------
 2 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/Changelog b/Changelog
index b51e15a..dd62151 100644
--- a/Changelog
+++ b/Changelog
@@ -7,6 +7,8 @@ Icinga 1.5.x Change Log
 ENHANCEMENTS
 
 FIXES
+* core: remove duplicated unlinks for check result files with multiple results #1615
+
 * classic ui: fix cross site scripting vulnerability in config.cgi on config expander arguments #1605
 
 
diff --git a/base/checks.c b/base/checks.c
index 30e44b5..35af506 100644
--- a/base/checks.c
+++ b/base/checks.c
@@ -319,9 +319,6 @@ int reap_check_results(void){
 
 				logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: Check result queue contained results for service '%s' on host '%s', but the service could not be found!  Perhaps you forgot to define the service in your config files?\n",queued_check_result->service_description,queued_check_result->host_name);
 
-				/* delete the file that contains the check results, as well as the ok-to-go file */
-				delete_check_result_file(queued_check_result->output_file);
-
 				/* free memory */
 				free_check_result(queued_check_result);
 				my_free(queued_check_result);
@@ -344,9 +341,6 @@ int reap_check_results(void){
 				/* make sure the host exists */
 				logit(NSLOG_RUNTIME_WARNING,TRUE,"Warning: Check result queue contained results for host '%s', but the host could not be found!  Perhaps you forgot to define the host in your config files?\n",queued_check_result->host_name);
 
-				/* delete the file that contains the check results, as well as the ok-to-go file */
-				delete_check_result_file(queued_check_result->output_file);
-
 				/* free memory */
 				free_check_result(queued_check_result);
 				my_free(queued_check_result);
@@ -362,10 +356,6 @@ int reap_check_results(void){
 			handle_async_host_check_result_3x(temp_host,queued_check_result);
 		}
 
-		/* delete the file that contains the check results, as well as the ok-to-go file */
-		/* files can contain multiple check results - in this case, the file will be removed when the first check result is processed */
-		delete_check_result_file(queued_check_result->output_file);
-
 		log_debug_info(DEBUGL_CHECKS|DEBUGL_IPC,1,"Deleted check result file '%s'\n",queued_check_result->output_file);
 
 		/* free allocated memory */





More information about the icinga-checkins mailing list