Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

Commit

Permalink
Allow exclude (!) to work for regexp matches for hosts (Franky Van Li…
Browse files Browse the repository at this point in the history
…edekerke)

Refs #5324
  • Loading branch information
Michael Friedrich authored and Michael Friedrich committed Jan 3, 2014
1 parent 1c149de commit f4c6e85
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion xdata/xodtemplate.c
Original file line number Diff line number Diff line change
Expand Up @@ -12642,6 +12642,8 @@ int xodtemplate_expand_contacts(xodtemplate_memberlist **list, xodtemplate_membe
/* 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;
else
use_regexp = FALSE;

/* use regular expression matching */
if (use_regexp == TRUE) {
Expand Down Expand Up @@ -12986,6 +12988,8 @@ int xodtemplate_expand_hosts(xodtemplate_memberlist **list, xodtemplate_memberli
/* 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;
else
use_regexp = FALSE;

/* use regular expression matching */
if (use_regexp == TRUE) {
Expand Down Expand Up @@ -13014,7 +13018,7 @@ int xodtemplate_expand_hosts(xodtemplate_memberlist **list, xodtemplate_memberli
continue;

/* add host to list */
xodtemplate_add_member_to_memberlist(list, temp_host->host_name, NULL);
xodtemplate_add_member_to_memberlist((reject_item == TRUE) ? reject_list:list, temp_host->host_name, NULL);
}

/* free memory allocated to compiled regexp */
Expand Down

0 comments on commit f4c6e85

Please sign in to comment.