[icinga-checkins] icinga.org: icinga-core/mfriedrich/core: fix wrong is_volatile conditions causing wrong service alerts in the logs

git at icinga.org git at icinga.org
Wed Jul 28 20:22:08 CEST 2010


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Wed Jul 28 20:22:02 2010 +0200

fix wrong is_volatile conditions causing wrong service alerts in the logs

fixes #650

---

 Changelog     |    3 ++-
 base/checks.c |    4 ++--
 cgi/config.c  |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Changelog b/Changelog
index 61eebd2..bbff818 100644
--- a/Changelog
+++ b/Changelog
@@ -11,7 +11,8 @@ FIXES
 * core: fix temp_path overwritten by check_result_path in base/config.c
 * core: modify execv to execvp, accepting 4096 cmd args, for both host and service checks with adapted error handling
 * core: execvp searches in PATH too like popen, and returns if error, outputting the errno string
-* core: fix possible overflows and increase command lenght limit in mini_epn's (Thomas Guyot-Sionnest)
+* core: fix possible overflows and increase command length limit in mini_epn's (Thomas Guyot-Sionnest)
+* core: fix wrong is_volatile conditions causing wrong service alerts in the logs
 
 * classic ui: fix image urls ins stylesheets
 
diff --git a/base/checks.c b/base/checks.c
index b5faedb..1dcff71 100644
--- a/base/checks.c
+++ b/base/checks.c
@@ -1652,7 +1652,7 @@ int handle_async_service_check_result(service *temp_service, check_result *queue
 			}
 
 			/* else log the problem (again) if this service is flagged as being volatile */
-			else if(temp_service->is_volatile==FALSE){
+			else if(temp_service->is_volatile!=FALSE){
 				log_service_event(temp_service);
 				state_was_logged=TRUE;
 			}
@@ -1678,7 +1678,7 @@ int handle_async_service_check_result(service *temp_service, check_result *queue
 			service_notification(temp_service,NOTIFICATION_NORMAL,NULL,NULL,NOTIFICATION_OPTION_NONE);
 
 			/* run the service event handler if we changed state from the last hard state or if this service is flagged as being volatile */
-			if(hard_state_change==TRUE || temp_service->is_volatile==FALSE)
+			if(hard_state_change==TRUE || temp_service->is_volatile!=FALSE)
 				handle_service_event(temp_service);
 
 			/* save the last hard state */
diff --git a/cgi/config.c b/cgi/config.c
index 09adff6..0226d16 100644
--- a/cgi/config.c
+++ b/cgi/config.c
@@ -1249,7 +1249,7 @@ void display_services(void){
 
 		printf("<TD CLASS='%s'>%s</TD>\n",bg_class,(temp_service->parallelize==TRUE)?"Yes":"No");
 
-		printf("<TD CLASS='%s'>%s</TD>\n",bg_class,(temp_service->is_volatile==FALSE)?"Yes":"No");
+		printf("<TD CLASS='%s'>%s</TD>\n",bg_class,(temp_service->is_volatile!=FALSE)?"Yes":"No");
 
 		printf("<TD CLASS='%s'>%s</TD>\n",bg_class,(temp_service->obsess_over_service==TRUE)?"Yes":"No");
 





More information about the icinga-checkins mailing list