Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Making :CLUSTER return "" instead of a NOCLUSTER error for clusters t…

…hat don't have them.
  • Loading branch information...
commit 0b4567acb8a1f2989ddd3a37d9efdd95c437a231 1 parent 10e6d48
@erikwb erikwb authored
Showing with 8 additions and 4 deletions.
  1. +8 −4 libcrange/source/functions/yamlfile.c
View
12 libcrange/source/functions/yamlfile.c
@@ -274,10 +274,14 @@ static range* _expand_cluster(range_request* rr,
res = set_get_data(e->sections, section);
if (!res) {
- char* cluster_section = apr_psprintf(req_pool,
- "%s:%s", cluster, section);
- range_request_warn_type(rr, "NOCLUSTER", cluster_section);
- return range_new(rr);
+ if(!strcmp(section, "CLUSTER")) {
+ res = "";
+ } else {
+ char* cluster_section = apr_psprintf(req_pool,
+ "%s:%s", cluster, section);
+ range_request_warn_type(rr, "NOCLUSTER", cluster_section);
+ return range_new(rr);
+ }
}
return do_range_expand(rr, res);
Please sign in to comment.
Something went wrong with that request. Please try again.