aqhome-nodes: write db on fini(). Extract info from DEVICE message.

This commit is contained in:
Martin Preuss
2024-09-18 00:15:43 +02:00
parent 08399ecf87
commit 7590aa3717
4 changed files with 30 additions and 11 deletions

View File

@@ -12,6 +12,7 @@
#include "./fini.h"
#include "./db.h"
#include "./aqhomed_p.h"
#include <gwenhywfar/gwenhywfar.h>
@@ -61,6 +62,8 @@ void AqHomed_Fini(AQHOMED *aqh)
aqh->ipcdEndpoint=NULL;
aqh->brokerEndpoint=NULL;
AqHomed_WriteNodeDb(aqh);
if (aqh->pidFile)
remove(aqh->pidFile);
}