More work on aqhome-react.

This commit is contained in:
Martin Preuss
2024-03-09 01:23:06 +01:00
parent 605d78a2b7
commit a3efa18a61
28 changed files with 1661 additions and 61 deletions

61
apps/aqhome-react/fini.c Normal file
View File

@@ -0,0 +1,61 @@
/****************************************************************************
* 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 <config.h>
#endif
#include "./fini.h"
#include "aqhome-react/aqhome_react_p.h"
#include <gwenhywfar/gwenhywfar.h>
#include <gwenhywfar/args.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/endpoint.h>
#include <unistd.h>
/* ------------------------------------------------------------------------------------------------
* defines
* ------------------------------------------------------------------------------------------------
*/
/* ------------------------------------------------------------------------------------------------
* forward declarations
* ------------------------------------------------------------------------------------------------
*/
/* ------------------------------------------------------------------------------------------------
* implementations
* ------------------------------------------------------------------------------------------------
*/
int AqHomeReact_Fini(AQHOME_REACT *aqh)
{
GWEN_MsgEndpoint_Disconnect(aqh->brokerEndpoint);
GWEN_MsgEndpoint_free(aqh->brokerEndpoint);
aqh->brokerEndpoint=NULL;
if (aqh->pidFile)
remove(aqh->pidFile);
return 0;
}