[icinga-checkins] icinga.org: icinga-core/dev/core: core: allow multiple empty (host) groups chained with enabled allow_empty_hostgroup_assignment #2437 - MF

git at icinga.org git at icinga.org
Tue Aug 28 10:31:02 CEST 2012


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

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Mon Aug 27 17:48:23 2012 +0200

core: allow multiple empty (host)groups chained with enabled allow_empty_hostgroup_assignment #2437 - MF

refs #2437

---

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

diff --git a/Changelog b/Changelog
index 8da8362..ff458ae 100644
--- a/Changelog
+++ b/Changelog
@@ -72,6 +72,7 @@ FIXES
 * core: unknown macros are not replaced, and misleading to single dollar signs #2291 - MF
 	** you can revert to the old behaviour with keep_unknown_macros=1 in icinga.cfg
 * core: fix having empty host/servicegroups, $HOST|SERVICEGROUPMEMBERS$ on-demand macro returns garbage on realloc (thx roguelazer) #2913 - MF
+* core: allow multiple empty (host)groups chained with enabled allow_empty_hostgroup_assignment #2437 - MF
 
 * classic ui: fix setting send_notification or sticky_ack as GET param has no effect on cmd.cgi acks #2926 - MF
 	** now you can finally disable checkboxes default ticked with these options
diff --git a/xdata/xodtemplate.c b/xdata/xodtemplate.c
index 2698f31..c1ae79c 100644
--- a/xdata/xodtemplate.c
+++ b/xdata/xodtemplate.c
@@ -7986,7 +7986,7 @@ int xodtemplate_recombobulate_hostgroups(void) {
 		temp_memberlist = xodtemplate_expand_hostgroups_and_hosts(NULL, temp_hostgroup->members, temp_hostgroup->_config_file, temp_hostgroup->_start_line);
 
 		/* add all members to the host group */
-		if (temp_memberlist == NULL) {
+		if (temp_memberlist == NULL && allow_empty_hostgroup_assignment == 0) {
 			logit(NSLOG_CONFIG_ERROR, TRUE, "Error: Could not expand members specified in hostgroup (config file '%s', starting on line %d)\n", xodtemplate_config_file_name(temp_hostgroup->_config_file), temp_hostgroup->_start_line);
 			return ERROR;
 		}





More information about the icinga-checkins mailing list