fixed another memory leak: handle received result responses

just remove them from the queue.
This commit is contained in:
Martin Preuss
2023-10-06 18:05:14 +02:00
parent 38ae2d3d1d
commit e98afa80d9
4 changed files with 117 additions and 0 deletions

View File

@@ -14,6 +14,7 @@
#include "./loop.h"
#include "./loop_tty.h"
#include "./loop_ipc.h"
#include "./loop_broker.h"
#include "./aqhomed_p.h"
#include "./tty_log.h"
#include "./db.h"
@@ -61,6 +62,21 @@ void AqHomed_Loop(AQHOMED *aqh, int timeoutInMsecs)
GWEN_MsgEndpoint_ChildrenIoLoop(aqh->rootEndpoint, timeoutInMsecs);
AqHomed_ReadAndHandleTtyMessages(aqh);
AqHomed_ReadAndHandleIpcMessages(aqh);
AqHomed_ReadAndHandleBrokerMessages(aqh);
#if 0
DBG_ERROR(NULL, "Messages in TTY queue: %d in, %d out",
GWEN_Msg_List_GetCount(GWEN_MsgEndpoint_GetReceivedMessageList(aqh->ttyEndpoint)),
GWEN_Msg_List_GetCount(GWEN_MsgEndpoint_GetSendMessageList(aqh->ttyEndpoint)));
DBG_ERROR(NULL, "Messages in IPC queue: %d in, %d out",
GWEN_Msg_List_GetCount(GWEN_MsgEndpoint_GetReceivedMessageList(aqh->ipcdEndpoint)),
GWEN_Msg_List_GetCount(GWEN_MsgEndpoint_GetSendMessageList(aqh->ipcdEndpoint)));
DBG_ERROR(NULL, "Messages in Broker queue: %d in, %d out",
GWEN_Msg_List_GetCount(GWEN_MsgEndpoint_GetReceivedMessageList(aqh->brokerEndpoint)),
GWEN_Msg_List_GetCount(GWEN_MsgEndpoint_GetSendMessageList(aqh->brokerEndpoint)));
#endif
if (AQH_NodeDb_IsModified(aqh->nodeDb)) {
if (aqh->dbFile) {