Revert "started working on mqtt support in aqhome-nodes"

This reverts commit 7fbc616ce4.
This commit is contained in:
Martin Preuss
2025-08-03 00:56:46 +02:00
parent 7fbc616ce4
commit 3f2ae9dd03
7 changed files with 16 additions and 481 deletions

View File

@@ -36,7 +36,6 @@
#define CONNCLEAN_INTERVAL_IN_SECS 2
#define CONNCHECK_INTERVAL_IN_SECS 10
#define PING_INTERVAL_IN_SECS 120
@@ -134,13 +133,11 @@ void _runService(AQH_OBJECT *aqh, AQH_EVENT_LOOP *eventLoop)
int timeout;
time_t timeLastConnectionCleanup;
time_t timeLastConnCheck;
time_t timeLastPingSend;
timeout=AQH_NodeServer_GetTimeout(aqh);
timeStart=time(NULL);
timeLastConnectionCleanup=time(NULL);
timeLastConnCheck=time(NULL);
timeLastPingSend=time(NULL);
while(!stopService) {
time_t now;
@@ -149,7 +146,6 @@ void _runService(AQH_OBJECT *aqh, AQH_EVENT_LOOP *eventLoop)
AQH_NodeServer_HandleTtyMsgs(aqh);
AQH_NodeServer_HandleClientMsgs(aqh);
AQH_NodeServer_HandleBrokerMsgs(aqh);
AQH_NodeServer_HandleMqttMsgs(aqh);
now=time(NULL);
@@ -163,20 +159,9 @@ void _runService(AQH_OBJECT *aqh, AQH_EVENT_LOOP *eventLoop)
DBG_INFO(NULL, "Check connections");
AQH_NodeServer_CheckBrokerConnection(aqh);
AQH_NodeServer_CheckTtyConnection(aqh);
AQH_NodeServer_CheckMqttConnection(aqh);
timeLastConnCheck=now;
}
if (_diffInSeconds(now, timeLastPingSend)>PING_INTERVAL_IN_SECS) {
int rv;
rv=AQH_NodeServer_SendPing(aqh);
if (rv<0) {
DBG_INFO(NULL, "Error sending PING");
}
timeLastPingSend=time(NULL);
}
if (timeout && (_diffInSeconds(now, timeStart)>timeout)) {
DBG_INFO(NULL, "Timeout");
break;