[icinga-checkins] icinga.org: icinga-core/test/core: fixed: Alert History State filter for HARD/SOFT state not working (Lennart Betz) #1722

git at icinga.org git at icinga.org
Sat Jul 16 18:20:00 CEST 2011


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

Author: Ricardo Bartels <ricardo at bitchbrothers.com>
Date:   Sat Jul 16 00:14:49 2011 +0200

fixed: Alert History State filter for HARD/SOFT state not working (Lennart Betz) #1722

fixes: #1722

* sorry, was my fault. forgot to update this vars during read log entries rewrite.

---

 Changelog     |    1 +
 cgi/history.c |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Changelog b/Changelog
index 5903b67..dfd670b 100644
--- a/Changelog
+++ b/Changelog
@@ -36,6 +36,7 @@ FIXES
 * classic ui: fixed: User can execute host/servicegroup commands even if not authorized for (Sven Nierlein) #1679
 * classic ui: fixed: plugin_output_short didn't get checked properly and caused segfault in status.cgi #1673
 * classic ui: fixed: submitting non existent host/service on avail.cgi causes segfault. (M. Luebben) #1700
+* classic ui: fixed: Alert History State filter for HARD/SOFT state not working (Lennart Betz) #1722
 
 * install: fix event handlers cmd file location in contrib #1501
 * install: fix make install-idoutils overwrites sample - adding idoutils.cfg-sample instead #1625
diff --git a/cgi/history.c b/cgi/history.c
index f15431c..3b378fe 100644
--- a/cgi/history.c
+++ b/cgi/history.c
@@ -786,9 +786,9 @@ void show_history(void){
 					if(display_line==TRUE && (history_type==HOST_HISTORY || history_type==SERVICE_HISTORY)){
 						if(state_options==STATE_ALL)
 							display_line=TRUE;
-						else if((state_options & STATE_SOFT) && strstr(temp_buffer,";SOFT;"))
+						else if((state_options & STATE_SOFT) && strstr(temp_entry->entry_text,";SOFT;"))
 							display_line=TRUE;
-						else if((state_options & STATE_HARD) && strstr(temp_buffer,";HARD;"))
+						else if((state_options & STATE_HARD) && strstr(temp_entry->entry_text,";HARD;"))
 							display_line=TRUE;
 						else
 							display_line=FALSE;
@@ -821,9 +821,9 @@ void show_history(void){
 
 						if(state_options==STATE_ALL)
 							display_line=TRUE;
-						else if((state_options & STATE_SOFT) && strstr(temp_buffer,";SOFT;"))
+						else if((state_options & STATE_SOFT) && strstr(temp_entry->entry_text,";SOFT;"))
 							display_line=TRUE;
-						else if((state_options & STATE_HARD) && strstr(temp_buffer,";HARD;"))
+						else if((state_options & STATE_HARD) && strstr(temp_entry->entry_text,";HARD;"))
 							display_line=TRUE;
 						else
 							display_line=FALSE;





More information about the icinga-checkins mailing list