aqhome: use new type GWEN_ConnectableMsgEndpoint.

This allows for reconnect of endpoints if necessary.
This commit is contained in:
Martin Preuss
2023-04-09 00:35:17 +02:00
parent 7490167694
commit c8afd7eb74
5 changed files with 44 additions and 37 deletions

View File

@@ -24,6 +24,7 @@
#include "aqhome/mqtt/endpoint_mqttc.h"
#include <gwenhywfar/endpoint_tcpc.h>
#include <gwenhywfar/endpoint_connectable.h>
#include <gwenhywfar/misc.h>
#include <gwenhywfar/debug.h>
@@ -140,7 +141,7 @@ void _loopOnceOverEndpoints(GWEN_MSG_ENDPOINT_MGR *emgr)
ep=GWEN_MsgEndpoint_List_First(endpointList);
while(ep) {
if (GWEN_MsgEndpoint_GetGroupId(ep) & AQH_MSGMGR_ENDPOINTGROUP_MQTT) {
if (GWEN_TcpcEndpoint_GetState(ep)>=GWEN_ENDPOINT_MQTTC_STATE_ESTABLISHED)
if (GWEN_ConnectableMsgEndpoint_GetState(ep)>=GWEN_ENDPOINT_MQTTC_STATE_ESTABLISHED)
_handleEndpoint(emgr, ep);
else {
DBG_INFO(AQH_LOGDOMAIN, "Not handling MQTT endpoint right now (not fully connected)");