Commit bfea35de authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

hal,snmp: fix interpretation of dot-config port monitoring setting

If it is disabled, it's commented out in dot-config, if it is enabled,
it appears with "=y"
parent c87ffcd3
...@@ -190,9 +190,9 @@ static int hal_port_init(struct hal_port_state *ps, int index) ...@@ -190,9 +190,9 @@ static int hal_port_init(struct hal_port_state *ps, int index)
ps->monitor = HAL_PORT_MONITOR_ENABLE; ps->monitor = HAL_PORT_MONITOR_ENABLE;
sprintf(key,"PORT%02i_INST%02i_MONITOR",port_i,1); sprintf(key,"PORT%02i_INST%02i_MONITOR",port_i,1);
if ((retValue = libwr_cfg_get(key)) == NULL ) { if ((retValue = libwr_cfg_get(key)) == NULL ) {
pr_error("port %i (%s): no key \"%s\" specified. Default to" ps->monitor = HAL_PORT_MONITOR_DISABLE;
" monitor=y.\n", pr_info("port %i (%s): monitor=n (%i)\n", port_i,
port_i, ps->name,key); ps->name, ps->monitor);
} else { } else {
if (!strcasecmp(retValue, "n")) { if (!strcasecmp(retValue, "n")) {
ps->monitor = HAL_PORT_MONITOR_DISABLE; ps->monitor = HAL_PORT_MONITOR_DISABLE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment