From 7bfb4e070a018cf38a3c977793eb4150d1b620c9 Mon Sep 17 00:00:00 2001 From: Nick Peng Date: Tue, 7 Nov 2023 00:14:10 +0800 Subject: [PATCH] dns_conf: Output log when configuration item is not supported --- src/dns_conf.c | 5 +++++ src/lib/conf.c | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/dns_conf.c b/src/dns_conf.c index 6dda14c366..68b9cb5bdd 100644 --- a/src/dns_conf.c +++ b/src/dns_conf.c @@ -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; } diff --git a/src/lib/conf.c b/src/lib/conf.c index 5c76d97dc7..88b5937402 100644 --- a/src/lib/conf.c +++ b/src/lib/conf.c @@ -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; }