Commit 3c0f2a03 authored by Alessandro Rubini's avatar Alessandro Rubini

trivial: don't restart or zero a timeout when we change state

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent be3e6c27
......@@ -87,14 +87,14 @@ int st_com_execute_slave(struct pp_instance *ppi)
if (ret < 0)
return ret;
if (pp_timeout_z(ppi, PP_TO_ANN_RECEIPT)) {
if (pp_timeout(ppi, PP_TO_ANN_RECEIPT)) {
ppi->frgn_rec_num = 0;
if (DSDEF(ppi)->clockQuality.clockClass != PP_CLASS_SLAVE_ONLY
&& (ppi->role != PPSI_ROLE_SLAVE)) {
ppi->next_state = PPS_MASTER;
} else {
ppi->next_state = PPS_LISTENING;
pp_timeout_restart_annrec(ppi);
pp_timeout_set(ppi, PP_TO_ANN_RECEIPT);
}
}
return 0;
......
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