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

Commit

Permalink
Parser: Allow CGIs to not fail on command CVs.
Browse files Browse the repository at this point in the history
Fixes #5940
  • Loading branch information
Michael Friedrich committed Apr 4, 2014
1 parent 2875c96 commit d1ded75
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -26,6 +26,7 @@ NEWS
FIXES

* core: fix regex using servicegroup members *,service fails to expand after lookup (Ricardo Melo) #3881 - MF
* classic ui: fix parser bailing on command object custom variables (Icinga 2 only) #5940 - MF


1.11.1 - 28/03/2014
Expand Down
2 changes: 1 addition & 1 deletion docbook
Submodule docbook updated from b6a55b to 460597
4 changes: 4 additions & 0 deletions xdata/xodtemplate.c
Expand Up @@ -1404,6 +1404,10 @@ int xodtemplate_add_object_property(char *input, int options) {
result = ERROR;
} else if (!strcmp(variable, "register"))
temp_command->register_object = (atoi(value) > 0) ? TRUE : FALSE;
else if (variable[0] == '_') {
#ifdef NSCORE
logit(NSLOG_CONFIG_ERROR, TRUE, "Warning: ignoring unused custom variable in command object directive '%s'.\n", variable);
#endif
else {
logit(NSLOG_CONFIG_ERROR, TRUE, "Error: Invalid command object directive '%s'.\n", variable);
return ERROR;
Expand Down

0 comments on commit d1ded75

Please sign in to comment.