From 07356b6171e3d6571d54ee05a9483e7103d3f7b5 Mon Sep 17 00:00:00 2001 From: Martin Preuss Date: Tue, 28 Mar 2023 21:42:28 +0200 Subject: [PATCH] aqhome, aqhomed: Adapted to latest changes. --- apps/aqhomed/main.c | 2 +- aqhome/ipc/endpoint_node_ipc_tcp.c | 9 +++++---- aqhome/ipc/endpoint_node_ipc_tcp.h | 8 ++++---- aqhome/ipc/msg_ipc_forward.c | 2 +- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/aqhomed/main.c b/apps/aqhomed/main.c index ada1521..19dcc4c 100644 --- a/apps/aqhomed/main.c +++ b/apps/aqhomed/main.c @@ -207,7 +207,7 @@ GWEN_MSG_ENDPOINT_MGR *_setupService(GWEN_DB_NODE *dbArgs) if (tcpAddress && *tcpAddress && tcpPort) { GWEN_MSG_ENDPOINT *epTcp; - epTcp=AQH_TcpIpcNodeEndpoint_new(NULL, tcpAddress, tcpPort, AQH_MSGMGR_ENDPOINTGROUP_IPC); + epTcp=AQH_TcpdIpcNodeEndpoint_new(tcpAddress, tcpPort, NULL, AQH_MSGMGR_ENDPOINTGROUP_IPC); if (epTcp==NULL) { DBG_ERROR(AQH_LOGDOMAIN, "Error creating endpoint TCP"); GWEN_MsgEndpointMgr_free(emgr); diff --git a/aqhome/ipc/endpoint_node_ipc_tcp.c b/aqhome/ipc/endpoint_node_ipc_tcp.c index f590d13..7be0697 100644 --- a/aqhome/ipc/endpoint_node_ipc_tcp.c +++ b/aqhome/ipc/endpoint_node_ipc_tcp.c @@ -19,10 +19,11 @@ #include #include #include -#include +#include -#define AQH_MSG_ENDPOINT_NODEIPCTCP_NAME "nodeipctcp" + +#define AQH_MSG_ENDPOINT_NODEIPCTCP_NAME "node_ipc_tcpd" @@ -32,11 +33,11 @@ static GWEN_MSG_ENDPOINT *_createChild(GWEN_MSG_ENDPOINT *ep); -GWEN_MSG_ENDPOINT *AQH_TcpIpcNodeEndpoint_new(const char *name, const char *host, int port, int groupId) +GWEN_MSG_ENDPOINT *AQH_TcpdIpcNodeEndpoint_new(const char *host, int port, const char *name, int groupId) { GWEN_MSG_ENDPOINT *ep; - ep=GWEN_TcpIpcEndpoint_new(name?name:AQH_MSG_ENDPOINT_NODEIPCTCP_NAME, host, port, groupId); + ep=GWEN_IpcTcpdEndpoint_new(host, port, name?name:AQH_MSG_ENDPOINT_NODEIPCTCP_NAME, groupId); GWEN_MsgEndpoint_AddFlags(ep, AQH_MSGEP_NODE_FLAGS_NOMESSAGES); GWEN_MsgEndpoint_SetCreateChildFn(ep, _createChild); diff --git a/aqhome/ipc/endpoint_node_ipc_tcp.h b/aqhome/ipc/endpoint_node_ipc_tcp.h index 5f38ec0..4a1f3b9 100644 --- a/aqhome/ipc/endpoint_node_ipc_tcp.h +++ b/aqhome/ipc/endpoint_node_ipc_tcp.h @@ -6,17 +6,17 @@ * should have received along with this file. ****************************************************************************/ -#ifndef AQH_ENDPOINT_NODE_IPC_TCP_H -#define AQH_ENDPOINT_NODE_IPC_TCP_H +#ifndef AQH_ENDPOINT_NODE_IPC_TCPD_H +#define AQH_ENDPOINT_NODE_IPC_TCPD_H #include -#include +#include -AQHOME_API GWEN_MSG_ENDPOINT *AQH_TcpIpcNodeEndpoint_new(const char *name, const char *host, int port, int groupId); +AQHOME_API GWEN_MSG_ENDPOINT *AQH_TcpdIpcNodeEndpoint_new(const char *host, int port, const char *name, int groupId); #endif diff --git a/aqhome/ipc/msg_ipc_forward.c b/aqhome/ipc/msg_ipc_forward.c index 8add94c..b67e88c 100644 --- a/aqhome/ipc/msg_ipc_forward.c +++ b/aqhome/ipc/msg_ipc_forward.c @@ -73,7 +73,7 @@ void AQH_ForwardIpcMsg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, cons GWEN_IpcMsg_GetProtoId(msg), GWEN_IpcMsg_GetProtoVersion(msg)); if (ptr && len) { - GWEN_Text_DumpString2Buffer(ptr, len, dbuf, 2); + GWEN_Text_DumpString2Buffer((const char*)ptr, len, dbuf, 2); GWEN_Buffer_AppendByte(dbuf, '\n'); } }