aqhome-nodes: write db on fini(). Extract info from DEVICE message.
This commit is contained in:
@@ -78,16 +78,8 @@ void AqHomed_Loop(AQHOMED *aqh, int timeoutInMsecs)
|
||||
GWEN_Msg_List_GetCount(GWEN_MsgEndpoint_GetSendMessageList(aqh->brokerEndpoint)));
|
||||
#endif
|
||||
|
||||
if (AQH_NodeDb_IsModified(aqh->nodeDb)) {
|
||||
if (aqh->dbFile) {
|
||||
GWEN_DB_NODE *dbNodeDb;
|
||||
|
||||
dbNodeDb=GWEN_DB_Group_new("nodeDb");
|
||||
AQH_NodeDb_toDb(aqh->nodeDb, dbNodeDb);
|
||||
GWEN_DB_WriteFile(dbNodeDb, aqh->dbFile, GWEN_DB_FLAGS_DEFAULT);
|
||||
GWEN_DB_Group_free(dbNodeDb);
|
||||
}
|
||||
}
|
||||
if (AQH_NodeDb_IsModified(aqh->nodeDb))
|
||||
AqHomed_WriteNodeDb(aqh);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user