Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
.pos is mutuaally exclusive with .param and .paran_r
Browse files Browse the repository at this point in the history
  • Loading branch information
jvoisin committed Oct 18, 2017
1 parent 76dc2f2 commit 066b79a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/sp_config_keywords.c
Expand Up @@ -204,10 +204,10 @@ int parse_disabled_functions(char *line) {
"'.r_filename' and '.filename' are mutually exclusive on line %zu.",
line, sp_line_no);
return -1;
} else if (df->r_param && df->param) {
} else if (1 < ((df->r_param?1:0) + (df->param?1:0) + ((-1 != df->pos)?1:0))) {
sp_log_err("config",
"Invalid configuration line: 'sp.disabled_functions%s':"
"'.r_param' and '.param' are mutually exclusive on line %zu.",
"'.r_param', '.param' and '.pos' are mutually exclusive on line %zu.",
line, sp_line_no);
return -1;
} else if (df->r_ret && df->ret) {
Expand Down
2 changes: 1 addition & 1 deletion src/tests/broken_conf_mutually_exclusive4.phpt
Expand Up @@ -6,4 +6,4 @@ Broken configuration
sp.configuration_file={PWD}/config/broken_conf_mutually_exclusive4.ini
--FILE--
--EXPECT--
[snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param' and '.param' are mutually exclusive on line 1.
[snuffleupagus][0.0.0.0][config][error] Invalid configuration line: 'sp.disabled_functions.function("system").param("id").value("42").param_r("^id$").drop();':'.r_param', '.param' and '.pos' are mutually exclusive on line 1.

0 comments on commit 066b79a

Please sign in to comment.