aqhome: fixed endpoint code. Now works again.

This commit is contained in:
Martin Preuss
2023-03-18 01:57:20 +01:00
parent 6507f3896f
commit 12d197dae2
12 changed files with 561 additions and 762 deletions

View File

@@ -12,6 +12,7 @@
#include "aqhome/msg/endpoint_log_p.h"
#include "aqhome/msg/endpoint_node.h"
#include "aqhome/msg/msg_value.h"
#include "aqhome/msg/msg_sendstats.h"
@@ -50,7 +51,7 @@ GWEN_MSG_ENDPOINT *AQH_LogEndpoint_new(const char *filename, int groupId)
GWEN_MSG_ENDPOINT *ep;
AQH_MSG_ENDPOINT_LOG *xep;
ep=GWEN_MsgEndpoint_new(AQH_MSG_ENDPOINT_LOG_NAME, groupId);
ep=AQH_NodeEndpoint_new(AQH_MSG_ENDPOINT_LOG_NAME, groupId);
GWEN_NEW_OBJECT(AQH_MSG_ENDPOINT_LOG, xep);
xep->filename=strdup(filename);
GWEN_INHERIT_SETDATA(GWEN_MSG_ENDPOINT, AQH_MSG_ENDPOINT_LOG, ep, xep, _freeData);
@@ -108,6 +109,7 @@ void _logMessage(GWEN_MSG_ENDPOINT *ep, const GWEN_MSG *msg)
GWEN_TIME *ti;
xep=GWEN_INHERIT_GETDATA(GWEN_MSG_ENDPOINT, AQH_MSG_ENDPOINT_LOG, ep);
assert(xep);
dbuf=GWEN_Buffer_new(0, 256, 0, 1);
ti=GWEN_CurrentTime();
GWEN_Time_toString(ti, "YYYY-MM-DD hh:mm:ss ", dbuf);