mqtt client: removed unused code.
This commit is contained in:
@@ -35,7 +35,6 @@ GWEN_INHERIT(GWEN_MSG_ENDPOINT, AQH_ENDPOINT_MQTTC)
|
|||||||
|
|
||||||
|
|
||||||
static void GWENHYWFAR_CB _freeData(void *bp, void *p);
|
static void GWENHYWFAR_CB _freeData(void *bp, void *p);
|
||||||
//static void _run(GWEN_MSG_ENDPOINT *ep);
|
|
||||||
static int _connect(GWEN_MSG_ENDPOINT *ep);
|
static int _connect(GWEN_MSG_ENDPOINT *ep);
|
||||||
static void _sendConnectMsg(GWEN_MSG_ENDPOINT *ep);
|
static void _sendConnectMsg(GWEN_MSG_ENDPOINT *ep);
|
||||||
static void _checkForConnAckMsg(GWEN_MSG_ENDPOINT *ep);
|
static void _checkForConnAckMsg(GWEN_MSG_ENDPOINT *ep);
|
||||||
@@ -71,7 +70,6 @@ GWEN_MSG_ENDPOINT *AQH_MqttClientEndpoint_new(const char *host, int port, const
|
|||||||
|
|
||||||
GWEN_MsgEndpoint_SetDefaultBufferSize(ep, GWEN_ENDPOINT_MQTTC_BUFFERSIZE);
|
GWEN_MsgEndpoint_SetDefaultBufferSize(ep, GWEN_ENDPOINT_MQTTC_BUFFERSIZE);
|
||||||
GWEN_MsgEndpoint_SetIsMsgCompleteFn(ep, _isMsgComplete);
|
GWEN_MsgEndpoint_SetIsMsgCompleteFn(ep, _isMsgComplete);
|
||||||
//xep->previousRunFn=GWEN_MsgEndpoint_SetRunFn(ep, _run);
|
|
||||||
GWEN_MsgEndpoint_SetProcessOutMsgFn(ep, _processOutMessage);
|
GWEN_MsgEndpoint_SetProcessOutMsgFn(ep, _processOutMessage);
|
||||||
xep->previousConnectFn=GWEN_ConnectableMsgEndpoint_SetConnectFn(ep, _connect);
|
xep->previousConnectFn=GWEN_ConnectableMsgEndpoint_SetConnectFn(ep, _connect);
|
||||||
GWEN_ConnectableMsgEndpoint_SetFullyConnectedState(ep, GWEN_ENDPOINT_MQTTC_STATE_ESTABLISHED);
|
GWEN_ConnectableMsgEndpoint_SetFullyConnectedState(ep, GWEN_ENDPOINT_MQTTC_STATE_ESTABLISHED);
|
||||||
@@ -190,34 +188,6 @@ void AQH_MqttClientEndpoint_SetTopicPrefix(GWEN_MSG_ENDPOINT *ep, const char *s)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void _run(GWEN_MSG_ENDPOINT *ep)
|
|
||||||
{
|
|
||||||
AQH_ENDPOINT_MQTTC *xep;
|
|
||||||
|
|
||||||
xep=GWEN_INHERIT_GETDATA(GWEN_MSG_ENDPOINT, AQH_ENDPOINT_MQTTC, ep);
|
|
||||||
if (xep) {
|
|
||||||
int state;
|
|
||||||
|
|
||||||
if (xep->previousRunFn)
|
|
||||||
xep->previousRunFn(ep);
|
|
||||||
|
|
||||||
state=GWEN_ConnectableMsgEndpoint_GetState(ep);
|
|
||||||
if (state==GWEN_MSG_ENDPOINT_CONN_STATE_CONNECTED)
|
|
||||||
_sendConnectMsg(ep);
|
|
||||||
else if (state==GWEN_ENDPOINT_MQTTC_STATE_WAITFORCONNACK)
|
|
||||||
_checkForConnAckMsg(ep);
|
|
||||||
else if (state==GWEN_ENDPOINT_MQTTC_STATE_ESTABLISHED ||
|
|
||||||
state<GWEN_MSG_ENDPOINT_CONN_STATE_CONNECTED){
|
|
||||||
/* nothing to do */
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
DBG_INFO(AQH_LOGDOMAIN, "Unhandled connection status %d", state);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int _connect(GWEN_MSG_ENDPOINT *ep)
|
int _connect(GWEN_MSG_ENDPOINT *ep)
|
||||||
{
|
{
|
||||||
AQH_ENDPOINT_MQTTC *xep;
|
AQH_ENDPOINT_MQTTC *xep;
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ struct AQH_ENDPOINT_MQTTC {
|
|||||||
uint16_t lastPacketId;
|
uint16_t lastPacketId;
|
||||||
uint16_t keepAliveTime;
|
uint16_t keepAliveTime;
|
||||||
|
|
||||||
GWEN_MSG_ENDPOINT_RUN_FN previousRunFn;
|
|
||||||
GWEN_CONN_ENDPOINT_CONNECT_FN previousConnectFn;
|
GWEN_CONN_ENDPOINT_CONNECT_FN previousConnectFn;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user