aqhome: More work on endpoint system. Basically works.

This commit is contained in:
Martin Preuss
2023-02-22 17:54:17 +01:00
parent da1ea9c268
commit 7a1968e962
12 changed files with 242 additions and 61 deletions

View File

@@ -47,7 +47,7 @@ AQH_MSG_ENDPOINT *AQH_MsgEndpointLog_new(const char *filename)
AQH_MSG_ENDPOINT *ep;
AQH_MSG_ENDPOINT_LOG *xep;
ep=AQH_MsgEndpoint_new(-1, AQH_MSG_ENDPOINT_ENDPOINTGROUP_NET);
ep=AQH_MsgEndpoint_new(-1, AQH_MSG_ENDPOINT_ENDPOINTGROUP_NET, "LOG");
GWEN_NEW_OBJECT(AQH_MSG_ENDPOINT_LOG, xep);
xep->filename=strdup(filename);
GWEN_INHERIT_SETDATA(AQH_MSG_ENDPOINT, AQH_MSG_ENDPOINT_LOG, ep, xep, _freeData);
@@ -143,7 +143,7 @@ void _writeToLogFile(const char *filename, const char *txt)
f=fopen(filename, "a+");
if (f) {
if (1!=fwrite(txt, strlen(txt), 1, f)) {
DBG_ERROR(NULL, "Error logging.");
DBG_ERROR(AQH_LOGDOMAIN, "Error logging.");
}
fclose(f);
}