more work on new events2-based apps.

This commit is contained in:
Martin Preuss
2025-03-11 00:56:18 +01:00
parent 9cca3af402
commit 263ce00a14
11 changed files with 135 additions and 24 deletions

View File

@@ -251,7 +251,7 @@ int AQH_ToolClient_Run(AQH_OBJECT *o)
if (xo) {
int rv;
rv=AQH_ToolClient_Connect(o, 0, xo->flags, 0);
rv=AQH_ToolClient_Connect(o, xo->flags, 0, 0);
if (rv<0) {
DBG_ERROR(NULL, "Error connecting (%d)", rv);
return 2;
@@ -397,6 +397,7 @@ int _exchangeConnectMsgs(AQH_TOOL_CLIENT *xo, uint32_t flags)
userId=GWEN_DB_GetCharValue(xo->dbLocalArgs, "userId", 0, NULL);
passw=GWEN_DB_GetCharValue(xo->dbLocalArgs, "password", 0, NULL);
DBG_ERROR(NULL, "Sending connect message for proto=%d.%d", xo->protoId, xo->protoVer);
msgId=AQH_Endpoint_GetNextMessageId(xo->ipcEndpoint);
msgOut=AQH_IpcMessageConnect_new(xo->protoId, xo->protoVer,
AQH_MSGTYPE_IPC_CONNECT_REQ,
@@ -492,7 +493,7 @@ AQH_MESSAGE *AQH_ToolClient_WaitForNodeMsg(AQH_OBJECT *o, int nodeSrcAddr, uint8
}
}
else {
DBG_ERROR(NULL, "Received unexpected message %d (%x), ignoring", code, code);
DBG_INFO(NULL, "Received unexpected message %d (%x), ignoring", code, code);
}
GWEN_Tag16_List_free(tagList);
}
@@ -543,7 +544,6 @@ int _sendWaitAndHandle(AQH_OBJECT *o, AQH_TOOL_CLIENT *xo)
return 2;
}
AQH_Endpoint_AddMsgOut(xo->ipcEndpoint, msgOut);
return _waitAndHandle(o, xo, msgId);
}
@@ -630,7 +630,7 @@ int _nodesWaitAndHandle(AQH_OBJECT *o, AQH_TOOL_CLIENT *xo)
if (msgIn) {
int rv;
DBG_ERROR(NULL, "Handling node message %d", AQH_NodeMessage_GetMsgType(msgIn));
DBG_INFO(NULL, "Handling node message %d", AQH_NodeMessage_GetMsgType(msgIn));
rv=_handleNodeResponseMessage(o, msgIn, first);
AQH_Message_free(msgIn);
first=0;
@@ -639,7 +639,7 @@ int _nodesWaitAndHandle(AQH_OBJECT *o, AQH_TOOL_CLIENT *xo)
return 3;
}
else if (rv==1) {
DBG_ERROR(NULL, "Done.");
DBG_INFO(NULL, "Done.");
return 0;
}
}