Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2018-07-18 21:03:03 +09:00
parent a658bd5714
commit 74a9ebaa55
10 changed files with 366 additions and 293 deletions

View File

@@ -82,7 +82,7 @@ void MQTTGWPublishHandler::handlePublish(Client* client, MQTTGWPacket* packet)
MQTTSN_topicid topicId;
uint16_t id = 0;
if (pub.topiclen == 2)
if (pub.topiclen <= 2)
{
topicId.type = MQTTSN_TOPIC_TYPE_SHORT;
*(topicId.data.short_name) = *pub.topic;