[config] fix more bugs in new config handling

personal/stbuehler/wip
Stefan Bühler 9 years ago
parent d65a2ffc16
commit e55f423203
  1. 2
      src/main/config_parser.rl
  2. 4
      src/main/plugin.c

@ -1673,7 +1673,7 @@ static gboolean p_condition_value(liConditionTree **tree, liConfigTokenizerConte
compop = LI_CONFIG_COND_NOSUFFIX;
break;
case TK_PREFIX:
compop = LI_CONFIG_COND_NOSUFFIX;
compop = LI_CONFIG_COND_PREFIX;
break;
case TK_SUBNET:
compop = LI_CONFIG_COND_IP;

@ -408,6 +408,10 @@ static gboolean li_parse_optionptr(liServer *srv, liWorker *wrk, liServerOptionP
assert(NULL != srv && NULL != wrk && NULL != sopt && NULL != name && NULL != mark);
if (NULL != val && LI_VALUE_LIST == sopt->type && val->type != LI_VALUE_LIST) {
li_value_wrap_in_list(val);
}
if (NULL != val && sopt->type != val->type && sopt->type != LI_VALUE_NONE) {
ERROR(srv, "Unexpected value type '%s', expected '%s' for option %s",
li_value_type_string(val), li_valuetype_string(sopt->type), name);

Loading…
Cancel
Save