aqhome: adapted server aqhome-mqttlog to events2 api.

This commit is contained in:
Martin Preuss
2025-03-08 01:03:22 +01:00
parent 58c6d12e36
commit ca2103f7b3
38 changed files with 3300 additions and 205 deletions

View File

@@ -107,6 +107,8 @@ int main(int argc, char **argv)
aqh=AQH_NodeServer_new(eventLoop);
rv=AQH_NodeServer_Init(aqh, argc, argv);
if (rv<0) {
if (rv==GWEN_ERROR_CLOSE)
return 1;
DBG_INFO(NULL, "here (%d)", rv);
return 2;
}

View File

@@ -592,13 +592,13 @@ int _exchangeConnect(AQH_OBJECT *o, AQH_NODE_SERVER *xo, uint32_t flags)
AQH_MESSAGE *msgOut;
uint32_t msgId;
msgId=AQH_Endpoint_GetNextMessageId(xo->ipcEndpoint);
msgId=AQH_Endpoint_GetNextMessageId(xo->brokerEndpoint);
msgOut=AQH_IpcMessageConnect_new(xo->protoId, xo->protoVer,
AQH_MSGTYPE_IPC_CONNECT_REQ,
msgId, 0,
xo->brokerClientId, NULL, NULL, flags);
AQH_Endpoint_AddMsgOut(xo->ipcEndpoint, msgOut);
return AQH_IpcEndpoint_WaitForResultMsg(xo->ipcEndpoint,
AQH_Endpoint_AddMsgOut(xo->brokerEndpoint, msgOut);
return AQH_IpcEndpoint_WaitForResultMsg(xo->brokerEndpoint,
xo->protoId, xo->protoVer, AQH_MSGTYPE_IPC_RESULT,
msgId, xo->timeoutInSeconds);
}
@@ -1206,7 +1206,7 @@ int _handleTtyDown(AQH_NODE_SERVER *xo)
{
if (xo->ttyEndpoint) {
DBG_ERROR(NULL, "TTY closed");
AQH_Object_AddFlags(xo->brokerEndpoint, AQH_OBJECT_FLAGS_DELETE);
AQH_Object_AddFlags(xo->ttyEndpoint, AQH_OBJECT_FLAGS_DELETE);
xo->timestampTtyDown=time(NULL);
}
return 1;