Commit 791a66e4 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: fix number of retries in read_ports

Iussue log entry after every 100 unsuccessful tries instead of
just one entry when more than 100 unsuccessful tries.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 2d816dc7
......@@ -249,10 +249,13 @@ static void wrs_ppsi_get_per_port(void)
}
retries++;
if (retries > 100) {
snmp_log(LOG_ERR, "%s: too many retries to read HAL\n",
__func__);
retries = 0;
}
} while (wrs_shm_seqretry(hal_head, ii));
if (retries > 100)
snmp_log(LOG_ERR, "%s: too many retries to read HAL\n",
__func__);
}
......
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