The condition to set the log level from the uci config if it hadn't been
set from the command line should be inverted to work properly.
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
if ((c = tb[ODHCPD_ATTR_LOGLEVEL])) {
int log_level = (blobmsg_get_u32(c) & LOG_PRIMASK);
- if (config.log_level != log_level && config.log_level_cmdline) {
+ if (config.log_level != log_level && !config.log_level_cmdline) {
config.log_level = log_level;
if (config.log_syslog)
setlogmask(LOG_UPTO(config.log_level));