/**************************************************************************** * This file is part of the project AqHome. * AqHome (c) by 2024 Martin Preuss, all rights reserved. * * The license for this file can be found in the file COPYING which you * should have received along with this file. ****************************************************************************/ #ifdef HAVE_CONFIG_H # include #endif #include "./fini.h" #include "aqhome-react/aqhome_react_p.h" #include #include #include #include #include /* ------------------------------------------------------------------------------------------------ * defines * ------------------------------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------------------------------ * forward declarations * ------------------------------------------------------------------------------------------------ */ /* ------------------------------------------------------------------------------------------------ * implementations * ------------------------------------------------------------------------------------------------ */ int AqHomeReact_Fini(AQHOME_REACT *aqh) { if (aqh) { GWEN_MsgEndpoint_Disconnect(aqh->brokerEndpoint); GWEN_MsgEndpoint_free(aqh->brokerEndpoint); aqh->brokerEndpoint=NULL; AQHREACT_Unit_List_Clear(aqh->unitList); aqh->timerUnit=NULL; aqh->serverVarChangeUnit=NULL; aqh->localVarChangeUnit=NULL; if (aqh->pidFile) remove(aqh->pidFile); AQH_Vars_free(aqh->localVars); } return 0; }