BugFix of Issue #35, #38

Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
tomoaki
2016-10-26 09:24:48 +09:00
parent 19c4d8208e
commit c3e8470812
3 changed files with 14 additions and 11 deletions

View File

@@ -865,7 +865,6 @@ Topic* Topics::add(MQTTSN_topicid* topicid)
{
Topic* topic;
uint16_t id = 0;
string* topicName = 0;
if (topicid->type != MQTTSN_TOPIC_TYPE_NORMAL)
{
@@ -879,8 +878,8 @@ Topic* Topics::add(MQTTSN_topicid* topicid)
}
else
{
topicName = new string(topicid->data.long_.name, topicid->data.long_.len);
topic = add(topicName);
string topicName = string(topicid->data.long_.name, topicid->data.long_.len);
topic = add(&topicName);
}
return topic;
}