Commit 97bfde82 authored by Alessandro Rubini's avatar Alessandro Rubini

timeout: kill pp_timeout_restart_annrec()

We now have the simpler pp_timeout(). Moreover, most uses were
needless, because now we reset all timeouts when we change state.
Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 28093d4b
......@@ -231,7 +231,6 @@ extern int pp_timeout(struct pp_instance *ppi, int index)
__attribute__((warn_unused_result));
extern int pp_timeout_z(struct pp_instance *ppi, int index);
extern int pp_ms_to_timeout(struct pp_instance *ppi, int index);
extern void pp_timeout_restart_annrec(struct pp_instance *ppi);
/* The channel for an instance must be created and possibly destroyed. */
extern int pp_init_globals(struct pp_globals *ppg, struct pp_runtime_opts *opts);
......
......@@ -186,7 +186,6 @@ static int wr_execute_slave(struct pp_instance *ppi)
return 0;
ppi->next_state = PPS_INITIALIZING;
pp_timeout_restart_annrec(ppi);
WR_DSPOR(ppi)->doRestart = FALSE;
return 1; /* the caller returns too */
}
......
......@@ -35,7 +35,6 @@ int wr_present(struct pp_instance *ppi, unsigned char *pkt, int plen)
if (sendmsg) {
__pp_timeout_set(ppi, PP_TO_EXT_0, WR_WRS_PRESENT_TIMEOUT_MS);
pp_timeout_restart_annrec(ppi);
e = msg_issue_wrsig(ppi, SLAVE_PRESENT);
}
......
......@@ -151,7 +151,7 @@ int st_com_slave_handle_announce(struct pp_instance *ppi, unsigned char *buf,
st_com_add_foreign(ppi, buf);
/*Reset Timer handling Announce receipt timeout*/
pp_timeout_restart_annrec(ppi);
pp_timeout_set(ppi, PP_TO_ANN_RECEIPT);
ppi->next_state = bmc(ppi); /* got a new announce: run bmc */
......
......@@ -140,8 +140,3 @@ int pp_ms_to_timeout(struct pp_instance *ppi, int index)
return ret <= 0 ? 0 : ret;
}
/* called several times, only sets a timeout, so inline it here */
void pp_timeout_restart_annrec(struct pp_instance *ppi)
{
pp_timeout_set(ppi, PP_TO_ANN_RECEIPT);
}
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