Commit a16a3460 authored by Alessandro Rubini's avatar Alessandro Rubini

state-slave: avoid some redundant calculation

Please note that timeout_init is not resetting timeouts, it's just
saving the values for later settings.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 9903624c
......@@ -81,9 +81,13 @@ int pp_slave(struct pp_instance *ppi, unsigned char *pkt, int plen)
if (e)
goto out;
DSPOR(ppi)->logMinDelayReqInterval =
hdr->logMessageInterval;
pp_timeout_init(ppi); /* new value for logMin */
if (DSPOR(ppi)->logMinDelayReqInterval !=
hdr->logMessageInterval) {
DSPOR(ppi)->logMinDelayReqInterval =
hdr->logMessageInterval;
/* new value for logMin */
pp_timeout_init(ppi);
}
} else {
pp_diag(ppi, frames, 2, "pp_slave : "
"Delay Resp doesn't match Delay Req\n");
......
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