added generic IPC result message.

This commit is contained in:
Martin Preuss
2023-08-13 17:56:00 +02:00
parent 64938b9cb0
commit 290967a7c5
6 changed files with 31 additions and 24 deletions

View File

@@ -16,7 +16,7 @@
#include "aqhome/ipc/endpoint_ipc.h"
#include "aqhome/ipc/nodes/msg_ipc_getdevices_req.h"
#include "aqhome/ipc/nodes/msg_ipc_getdevices_rsp.h"
#include "aqhome/ipc/nodes/msg_ipc_error.h"
#include "aqhome/ipc/msg_ipc_result.h"
#include "aqhome/msg/msg_node.h"
#include <gwenhywfar/args.h>
@@ -154,7 +154,7 @@ int _doGetDevices(GWEN_DB_NODE *dbArgs)
}
code=GWEN_IpcMsg_GetCode(msg);
if (code==AQH_MSGTYPE_IPC_NODES_ERROR) {
fprintf(stdout, "No device list (%d)\n", AQH_ErrorIpcMsg_GetErrorCode(msg));
fprintf(stdout, "No device list (%d)\n", AQH_ResultIpcMsg_GetResultCode(msg));
GWEN_Msg_free(msg);
break;
}

View File

@@ -28,7 +28,7 @@
#include "aqhome/ipc/nodes/msg_ipc_ping.h"
#include "aqhome/ipc/nodes/msg_ipc_setaccmsggrps.h"
#include "aqhome/ipc/nodes/msg_ipc_getdevices_rsp.h"
#include "aqhome/ipc/nodes/msg_ipc_error.h"
#include "aqhome/ipc/msg_ipc_result.h"
#include <gwenhywfar/gwenhywfar.h>
#include <gwenhywfar/args.h>
@@ -176,7 +176,7 @@ void _handleIpcMsgGetDevicesReq(AQHOMED *aqh, GWEN_MSG_ENDPOINT *ep, const GWEN_
GWEN_MSG *msgOut;
DBG_INFO(AQH_LOGDOMAIN, "No nodes");
msgOut=AQH_ErrorIpcMsg_new(AQH_MSGTYPE_IPC_NODES_ERROR, AQH_MSG_IPC_ERROR_NODATA);
msgOut=AQH_ResultIpcMsg_new(AQH_MSGTYPE_IPC_NODES_ERROR, AQH_MSG_IPC_ERROR_NODATA);
GWEN_MsgEndpoint_AddSendMessage(ep, msgOut);
}
}