# HG changeset patch # User Florian Pose # Date 1224250255 0 # Node ID 1189e040fe126cb145879307275e5ba2ac53c162 # Parent c4fafee8043aba9e01f9d2587c38fd1dfada68b8 merge -c1521 branches/stable-1.4: Fixed race concerning ec_slave_config_state->operational. diff -r c4fafee8043a -r 1189e040fe12 master/fsm_master.c --- a/master/fsm_master.c Fri Oct 17 08:04:08 2008 +0000 +++ b/master/fsm_master.c Fri Oct 17 13:30:55 2008 +0000 @@ -790,6 +790,8 @@ if (ec_fsm_slave_config_exec(&fsm->fsm_slave_config)) return; + fsm->slave->force_config = 0; + // configuration finished master->config_busy = 0; wake_up_interruptible(&master->config_queue); diff -r c4fafee8043a -r 1189e040fe12 master/fsm_slave_config.c --- a/master/fsm_slave_config.c Fri Oct 17 08:04:08 2008 +0000 +++ b/master/fsm_slave_config.c Fri Oct 17 13:30:55 2008 +0000 @@ -172,10 +172,6 @@ EC_DBG("Configuring slave %u...\n", fsm->slave->ring_position); } - // configuration will be done immediately; therefore reset the - // force flag - fsm->slave->force_config = 0; - ec_fsm_change_start(fsm->fsm_change, fsm->slave, EC_SLAVE_STATE_INIT); ec_fsm_change_exec(fsm->fsm_change); fsm->state = ec_fsm_slave_config_state_init; diff -r c4fafee8043a -r 1189e040fe12 master/slave_config.c --- a/master/slave_config.c Fri Oct 17 08:04:08 2008 +0000 +++ b/master/slave_config.c Fri Oct 17 13:30:55 2008 +0000 @@ -807,7 +807,8 @@ state->online = sc->slave ? 1 : 0; if (state->online) { state->operational = - sc->slave->current_state == EC_SLAVE_STATE_OP; + sc->slave->current_state == EC_SLAVE_STATE_OP + && !sc->slave->force_config; state->al_state = sc->slave->current_state; } else { state->operational = 0;