Add: Two Gateway Test programs

BugFix: invalid pointer

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2018-06-28 08:42:51 +09:00
parent e734fccb38
commit 9ae5c72125
14 changed files with 415 additions and 22 deletions

View File

@@ -441,6 +441,15 @@ PubElement* LPublishManager::add(const char* topicName, uint16_t topicId, uint8_
elm->status = TOPICID_IS_READY;
elm->topicId = topicId;
}
else
{
uint16_t id = theClient->getTopicId(topicName);
if ( id )
{
elm->status = TOPICID_IS_READY;
elm->topicId = id;
}
}
elm->payloadlen = len;
elm->msgId = msgId;