Prepared introduction of multiple ipc protocols.
This commit is contained in:
@@ -14,8 +14,8 @@
|
||||
#include "./utils.h"
|
||||
|
||||
#include "aqhome/ipc/endpoint_ipc.h"
|
||||
#include "aqhome/ipc/msg_ipc_setaccmsggrps.h"
|
||||
#include "aqhome/ipc/msg_ipc_forward.h"
|
||||
#include "aqhome/ipc/nodes/msg_ipc_setaccmsggrps.h"
|
||||
#include "aqhome/ipc/nodes/msg_ipc_forward.h"
|
||||
|
||||
#include <gwenhywfar/endpoint_tcpc.h>
|
||||
#include <gwenhywfar/debug.h>
|
||||
@@ -70,7 +70,7 @@ GWEN_MSG *Utils_WaitForSpecificNodeMessage(GWEN_MSG_ENDPOINT *epTcp,
|
||||
GWEN_MsgEndpoint_IoLoop(epTcp, 2000); /* 2000 ms */
|
||||
msg=GWEN_MsgEndpoint_TakeFirstReceivedMessage(epTcp);
|
||||
if (msg) {
|
||||
if (GWEN_IpcMsg_GetCode(msg)==AQH_MSGTYPE_IPC_FORWARD) {
|
||||
if (GWEN_IpcMsg_GetCode(msg)==AQH_MSGTYPE_IPC_NODES_FORWARD) {
|
||||
GWEN_MSG *nodeMsg;
|
||||
|
||||
DBG_INFO(NULL, "Received IPC FORWARD message");
|
||||
@@ -125,7 +125,7 @@ GWEN_MSG *Utils_WaitForSpecificIpcMessage(GWEN_MSG_ENDPOINT *epTcp,
|
||||
DBG_INFO(NULL, "Received expected IPC message");
|
||||
return msg;
|
||||
}
|
||||
else if (code==AQH_MSGTYPE_IPC_ERROR) {
|
||||
else if (code==AQH_MSGTYPE_IPC_NODES_ERROR) {
|
||||
DBG_INFO(NULL, "Received IPC error message");
|
||||
return msg;
|
||||
}
|
||||
@@ -169,7 +169,7 @@ int Utils_SendAcceptedMsgGroups(GWEN_MSG_ENDPOINT *epTcp, uint32_t groups)
|
||||
{
|
||||
GWEN_MSG *msgOut;
|
||||
|
||||
msgOut=AQH_SetAcceptedMsgGroupsIpcMsg_new(AQH_MSGTYPE_IPC_SETACCMSGGRPS, groups);
|
||||
msgOut=AQH_SetAcceptedMsgGroupsIpcMsg_new(AQH_MSGTYPE_IPC_NODES_SETACCMSGGRPS, groups);
|
||||
if (msgOut==NULL) {
|
||||
DBG_ERROR(NULL, "Error creating message");
|
||||
return GWEN_ERROR_GENERIC;
|
||||
|
||||
Reference in New Issue
Block a user