[icinga-checkins] icinga.org: icinga-core/feature/exclude-with-regexp-3720: config parser: fix missing exclude on host expansion

git at icinga.org git at icinga.org
Sat Jul 20 13:54:46 CEST 2013


Module: icinga-core
Branch: feature/exclude-with-regexp-3720
Commit: 10d2cb0d8127b39a766baf0be4b035809f1ea082
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=10d2cb0d8127b39a766baf0be4b035809f1ea082

Author: Michael Friedrich <Michael.Friedrich at netways.de>
Date:   Sat Jul 20 12:53:22 2013 +0200

config parser: fix missing exclude on host expansion

refs #3720

---

 xdata/xodtemplate.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/xdata/xodtemplate.c b/xdata/xodtemplate.c
index 183a1c0..3339652 100644
--- a/xdata/xodtemplate.c
+++ b/xdata/xodtemplate.c
@@ -12900,6 +12900,12 @@ int xodtemplate_expand_hosts(xodtemplate_memberlist **list, xodtemplate_memberli
 		/* strip trailing spaces */
 		strip(temp_ptr);
 
+		/* this host should be excluded (rejected) */
+		if (temp_ptr[0] == '!') {
+			reject_item = TRUE;
+			temp_ptr++;
+		}
+
 		/* should we use regular expression matching? */
 		if (use_regexp_matches == TRUE && (use_true_regexp_matching == TRUE || strstr(temp_ptr, "*") || strstr(temp_ptr, "?") || strstr(temp_ptr, "+") || strstr(temp_ptr, "\\.")))
 			use_regexp = TRUE;





More information about the icinga-checkins mailing list