dns_conf: Output log when configuration item is not supported

This commit is contained in:
Nick Peng
2023-11-07 00:14:10 +08:00
parent 14330dd5da
commit 7bfb4e070a
2 changed files with 5 additions and 1 deletions

View File

@@ -4177,6 +4177,11 @@ static int _conf_printf(const char *file, int lineno, int ret)
syslog(LOG_NOTICE, "process config file '%s' failed at line %d.", file, lineno);
return -1;
break;
case CONF_RET_NOENT:
tlog(TLOG_WARN, "unsupported config at '%s:%d'.", file, lineno);
syslog(LOG_NOTICE, "unsupported config at '%s:%d'.", file, lineno);
return -1;
break;
default:
break;
}

View File

@@ -440,7 +440,6 @@ static int load_conf_file(const char *file, struct config_item *items, conf_erro
}
if (items[i].item == NULL) {
handler(file, line_no, CONF_RET_NOENT);
break;
}