Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2019-07-13 16:38:12 +09:00
parent 18885668cf
commit 93e297c6d3
6 changed files with 39 additions and 25 deletions

View File

@@ -416,9 +416,9 @@ Client* ClientList::createClient(SensorNetAddress* addr, MQTTSNString* clientId,
Client* ClientList::createPredefinedTopic( MQTTSNString* clientId, string topicName, uint16_t topicId, bool aggregate)
{
if ( clientId->cstring == common_topic )
if ( strcmp(clientId->cstring, common_topic) == 0 )
{
_gateway->getTopics()->add((const char*)topicName.c_str(), topicId);
theGateway->getTopics()->add((const char*)topicName.c_str(), topicId);
return 0;
}
else