mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 23:46:51 +01:00
@@ -63,9 +63,8 @@ void MQTTGWPublishHandler::handlePublish(Client* client, MQTTGWPacket* packet)
|
||||
topicId.data.long_.len = pub.topiclen;
|
||||
topicId.data.long_.name = pub.topic;
|
||||
id = client->getTopics()->getTopicId(&topicId);
|
||||
}
|
||||
|
||||
if (id > 0)
|
||||
if ( id > 0 )
|
||||
{
|
||||
topicId.data.id = id;
|
||||
}
|
||||
@@ -127,11 +126,13 @@ void MQTTGWPublishHandler::handlePublish(Client* client, MQTTGWPacket* packet)
|
||||
else
|
||||
{
|
||||
WRITELOG("\x1b[0m\x1b[31mMQTTGWPublishHandler Can't create a Topic.\n");
|
||||
delete snPacket;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* TopicId was aquired. */
|
||||
/* TopicId was acquired. */
|
||||
if (client->isSleep())
|
||||
{
|
||||
/* client is sleeping. save PUBLISH */
|
||||
|
||||
Reference in New Issue
Block a user