Commit 1661d43b authored by Jean-Claude BAU's avatar Jean-Claude BAU

Set instance state to DISABLED at startup

At startup the state of a instance is set to DISABLED and will be set
if the link is up to INITIALIZING. This is done to be coherent with the
curent behavior: the state becomes DISABLED when the link is down
parent 043af2b4
......@@ -107,6 +107,8 @@ int pp_leave_current_state(struct pp_instance *ppi)
ppi->state = ppi->next_state;
if ( ppi->state==PPS_DISABLED )
ppi->pdstate = PP_PDSTATE_NONE; // Clear state
ppi->flags &= ~PPI_FLAGS_WAITING;
pp_diag_fsm(ppi, ppi->current_state_item->name, STATE_LEAVE, 0);
/* next_delay unused: go to new state now */
......@@ -141,7 +141,8 @@ int pp_init_globals(struct pp_globals *ppg, struct pp_runtime_opts *pp_rt_opts)
for (i = 0; i < get_numberPorts(def); i++) {
struct pp_instance *ppi = INST(ppg, i);
ppi->state = PPS_INITIALIZING;
ppi->state = PPS_DISABLED;
ppi->pdstate = PP_PDSTATE_NONE;
ppi->current_state_item = NULL;
ppi->port_idx = i;
ppi->frgn_rec_best = -1;
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