mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Make res_snmp fit general coding style (issue #7192 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -59,23 +59,20 @@ static int load_config(void)
|
|||||||
else if (ast_false(var->value))
|
else if (ast_false(var->value))
|
||||||
res_snmp_agentx_subagent = 0;
|
res_snmp_agentx_subagent = 0;
|
||||||
else {
|
else {
|
||||||
ast_log(LOG_ERROR, "Value '%s' does not evaluate to true or false.\n",
|
ast_log(LOG_ERROR, "Value '%s' does not evaluate to true or false.\n", var->value);
|
||||||
var->value);
|
|
||||||
ast_config_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
} else if (strcasecmp(var->name, "enabled") == 0) {
|
} else if (strcasecmp(var->name, "enabled") == 0) {
|
||||||
res_snmp_enabled = ast_true(var->value);
|
res_snmp_enabled = ast_true(var->value);
|
||||||
} else {
|
} else {
|
||||||
ast_log(LOG_ERROR, "Unrecognized variable '%s' in category '%s'\n",
|
ast_log(LOG_ERROR, "Unrecognized variable '%s' in category '%s'\n", var->name, cat);
|
||||||
var->name, cat);
|
|
||||||
ast_config_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
var = var->next;
|
var = var->next;
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
ast_log(LOG_ERROR, "Unrecognized category '%s'\n", cat);
|
ast_log(LOG_ERROR, "Unrecognized category '%s'\n", cat);
|
||||||
ast_config_destroy(cfg);
|
ast_config_destroy(cfg);
|
||||||
return 1;
|
return 1;
|
||||||
|
Reference in New Issue
Block a user