Changeset 14362 for trunk/FACT++/src


Ignore:
Timestamp:
08/13/12 21:23:17 (12 years ago)
Author:
tbretz
Message:
Return codes for state handlers were missing.
File:
1 edited

Legend:

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

    r14353 r14362  
    713713    }
    714714
    715     void HandleControlStateChange(const EventImp &d)
     715    int HandleControlStateChange(const EventImp &d)
    716716    {
    717717        if (d.GetSize()==0)
    718             return;
     718            return StateMachineImp::kSM_KeepState;
    719719
    720720        // [0] DimControl::kReady (Idle)
     
    731731
    732732        if (d.GetQoS()>=2)
    733             return;
     733            return StateMachineImp::kSM_KeepState;
    734734
    735735#if BOOST_VERSION < 104600
     
    742742        if (!file.empty())
    743743            HandleControlMessageImp(Event(d, file.data(), file.length()+1));
     744
     745        return StateMachineImp::kSM_KeepState;
    744746    }
    745747
     
    757759    }
    758760
    759     void HandleFscControlStateChange(const EventImp &d)
     761    int HandleFscControlStateChange(const EventImp &d)
    760762    {
    761763        const int32_t &last  = fDimFscControl.last.second;
     
    763765
    764766        if (last==DimState::kOffline || state==DimState::kOffline)
    765             return;
     767            return StateMachineImp::kSM_KeepState;
    766768
    767769        if (last<FSC::State::kConnected && state==FSC::State::kConnected)
     
    776778            SetAudio("shutdown");
    777779        }
     780
     781        return StateMachineImp::kSM_KeepState;
    778782    }
    779783
     
    924928    }
    925929
    926     void HandleDriveControlStateChange(const EventImp &d)
     930    int HandleDriveControlStateChange(const EventImp &d)
    927931    {
    928932        const int32_t &last  = fDimFscControl.last.second;
     
    930934
    931935        if (last==DimState::kOffline || state==DimState::kOffline)
    932             return;
     936            return StateMachineImp::kSM_KeepState;
    933937
    934938        if (last<Drive::State::kArmed && state>=Drive::State::kArmed)
     
    937941        if (last>=Drive::State::kArmed && state<Drive::State::kArmed)
    938942            AddMcpConfigurationHist(d, "Drive disconnected");
     943
     944        return StateMachineImp::kSM_KeepState;
    939945    }
    940946
     
    17571763    // -------------------------------------------------------------------
    17581764
    1759     void HandleDoTest(const EventImp &d)
     1765    int HandleDoTest(const EventImp &d)
    17601766    {
    17611767        ostringstream out;
     
    17711777
    17721778        ofstream(fPath+"/dotest.data") << out.str();
     1779
     1780        return StateMachineImp::kSM_KeepState;
    17731781    }
    17741782
Note: See TracChangeset for help on using the changeset viewer.