Skip to content

Commit

Permalink
dns_conf: Output log when configuration item is not supported
Browse files Browse the repository at this point in the history
  • Loading branch information
pymumu committed Nov 6, 2023
1 parent 14330dd commit 7bfb4e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/dns_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7bfb4e0

Please sign in to comment.