Commit 1c4572c4 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: fix crashes at startup in wrsPortStatusTable

Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 5379741e
......@@ -71,6 +71,12 @@ time_t wrsPortStatusTable_data_fill(unsigned int *n_rows)
port_state = hal_lookup_port(hal_ports,
hal_nports_local,
wrsPortStatusTable_array[i].port_name);
if(!port_state) {
/* It looks like we're in strange situation
* that HAL is up but hal_ports is not filled
*/
continue;
}
/* No need to copy all ports structures, only what
* we're interested in.
* Keep value 0 for Not available
......
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