mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-15 08:26:51 +01:00
@@ -323,6 +323,11 @@ void Client::tryConnect(void)
|
||||
_status = Cstat_TryConnecting;
|
||||
}
|
||||
|
||||
bool Client::isCleanSession(void)
|
||||
{
|
||||
return _sessionStatus;
|
||||
}
|
||||
|
||||
bool Client::isConnectSendable(void)
|
||||
{
|
||||
if (_status == Cstat_Lost || _status == Cstat_TryConnecting)
|
||||
|
||||
@@ -254,6 +254,7 @@ public:
|
||||
bool isSecureNetwork(void);
|
||||
bool isSensorNetStable(void);
|
||||
bool isWaitWillMsg(void);
|
||||
bool isCleanSession(void);
|
||||
|
||||
void holdPingRequest(void);
|
||||
void resetPingRequest(void);
|
||||
|
||||
@@ -63,6 +63,7 @@ MQTTGWPacket* MQTTSNSubscribeHandler::handleSubscribe(Client* client,
|
||||
|
||||
if (!topic)
|
||||
{
|
||||
/* Search the topic in Client common topic table */
|
||||
topic = _gateway->getTopics()->getTopicById(&topicFilter);
|
||||
if (topic)
|
||||
{
|
||||
@@ -133,7 +134,7 @@ MQTTGWPacket* MQTTSNSubscribeHandler::handleSubscribe(Client* client,
|
||||
|
||||
RespExit: MQTTSNPacket* sSuback = new MQTTSNPacket();
|
||||
sSuback->setSUBACK(qos, topicFilter.data.id, msgId,
|
||||
MQTTSN_RC_NOT_SUPPORTED);
|
||||
MQTTSN_RC_REJECTED_INVALID_TOPIC_ID);
|
||||
evsuback = new Event();
|
||||
evsuback->setClientSendEvent(client, sSuback);
|
||||
_gateway->getClientSendQue()->post(evsuback);
|
||||
|
||||
Reference in New Issue
Block a user