mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 15:36:51 +01:00
Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,10 @@ void EventQue::setMaxSize(uint16_t maxSize)
|
||||
|
||||
Event* EventQue::wait(void)
|
||||
{
|
||||
Event* ev;
|
||||
Event* ev = 0;
|
||||
|
||||
while(ev == 0)
|
||||
{
|
||||
if ( _que.size() == 0 )
|
||||
{
|
||||
_sem.wait();
|
||||
@@ -323,6 +326,7 @@ Event* EventQue::wait(void)
|
||||
ev = _que.front();
|
||||
_que.pop();
|
||||
_mutex.unlock();
|
||||
}
|
||||
return ev;
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace MQTTSNGW
|
||||
/*=================================
|
||||
* Starting prompt
|
||||
==================================*/
|
||||
#define GATEWAY_VERSION " * Version: 0.9.3"
|
||||
#define GATEWAY_VERSION " * Version: 0.9.4"
|
||||
|
||||
#define PAHO_COPYRIGHT0 " * MQTT-SN Transparent Gateway"
|
||||
#define PAHO_COPYRIGHT1 " * Part of Project Paho in Eclipse"
|
||||
|
||||
Reference in New Issue
Block a user