Changeset 15239


Ignore:
Timestamp:
04/04/13 11:16:29 (12 years ago)
Author:
tbretz
Message:
Fixed a race-condition during configuration with the states of the ratecontrol.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/mcp.cc

    r15036 r15239  
    309309            Dim::SendCommandNB("FTM_CONTROL/CONFIGURE", fRunType);
    310310
     311            // That's a bit stupid, but we have to stop the ratecontrol
     312            // first, otherwise it might be detected to be
     313            // in a state larger than Connected in Configuring3
     314            // (because it still was) before the state change introduced
     315            // by the Configuring2 state is even received. If instead
     316            // we wait in Configuring2 for the rate control to be connected,
     317            // we can be sure that it works.
     318            Message("Stopping ratecontrol");
     319            Dim::SendCommandNB("RATE_CONTROL/STOP");
     320
    311321            Update(MCP::State::kConfiguring2);
    312322            return MCP::State::kConfiguring2;
     
    320330            if ((/*fDimFTM.state() != FTM::State::kConfiguring2 &&*/
    321331                 fDimFTM.state() != FTM::State::kConfigured) ||
    322                 fDimLog.state()<30 || fDimLog.state()>0xff)
     332                fDimLog.state()<30 || fDimLog.state()>0xff ||
     333                fDimRC.state()!=RateControl::State::kConnected)
    323334                return MCP::State::kConfiguring2;
    324335
Note: See TracChangeset for help on using the changeset viewer.