Commit c2706bf6 authored by Adam Wujek's avatar Adam Wujek 💬

userspace/snmpd: don't update wrsPTPStatus when only spllStatus changes

When wrsPTPStatus can only be updated when both ptp_data and spllStatus are
updated. Otherwise spllStatus changes may cause wrong delta calculation
in get_wrsPTPStatus function. In this case prev data is the same as current,
which may produce false error.
Signed-off-by: Adam Wujek's avatarAdam Wujek <adam.wujek@cern.ch>
parent 6a3f740f
......@@ -53,18 +53,21 @@ time_t wrsTimingStatus_data_fill(void)
return time_update;
}
/* update only when ptp_data or spll was updated */
/* update when ptp_data and spll status were updated
* otherwise there may be comparison between the same data */
if (time_ptp_data > time_update
|| time_spll > time_update) {
&& time_spll > time_update) {
get_wrsPTPStatus(ptp_data_nrows);
}
/* update only when the spll was updated */
/* update when the spll was updated
* otherwise there may be comparison between the same data */
if (time_spll > time_update) {
get_wrsSoftPLLStatus();
}
/* update only when the port_status was updated */
/* update only when the port_status was updated
* otherwise there may be comparison between the same data */
if (time_port_status > time_update) {
get_wrsSlaveLinksStatus(port_status_nrows);
get_wrsPTPFramesFlowing(port_status_nrows);
......
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