mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 15:36:51 +01:00
BugFix: MQTTSNDeserialize_XXXX() functions don't return error code when
error occurs. Do not store the length of packet into rc. If the packet is incorrect, skip the processing that follows. Bugfix: Print out the value of TopicId in SUBACK and UNSUBACK. Signed-off-by: tomoaki <tomoaki@tomy-tech.com>
This commit is contained in:
@@ -185,7 +185,7 @@ struct LUdpConfig{
|
||||
/*=================================
|
||||
* Starting prompt
|
||||
==================================*/
|
||||
#define TESTER_VERSION " * Version: 0.1.0"
|
||||
#define TESTER_VERSION " * Version: 1.1.0"
|
||||
|
||||
#define PAHO_COPYRIGHT0 " * MQTT-SN Gateway Tester"
|
||||
#define PAHO_COPYRIGHT1 " * Part of Project Paho in Eclipse"
|
||||
|
||||
@@ -222,7 +222,7 @@ void LSubscribeManager::responce(const uint8_t* msg)
|
||||
{
|
||||
tt->add((char*) elm->topicName, topicId, elm->topicType, elm->callback);
|
||||
getElement(msgId)->done = SUB_DONE;
|
||||
DISPLAY("\033[0m\033[0;32m Topic \"%s\" Id : %d was Subscribed. \033[0m\033[0;37m\n\n", getElement(msgId)->topicName, getElement(msgId)->topicId);
|
||||
DISPLAY("\033[0m\033[0;32m Topic \"%s\" Id : %d was Subscribed. \033[0m\033[0;37m\n\n", getElement(msgId)->topicName, topicId);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -239,7 +239,7 @@ void LSubscribeManager::responce(const uint8_t* msg)
|
||||
{
|
||||
LTopicTable* tt = theClient->getGwProxy()->getTopicTable();
|
||||
tt->setCallback(elm->topicName, 0);
|
||||
DISPLAY("\033[0m\033[0;32m Topic \"%s\" Id : %d was Unsubscribed. \033[0m\033[0;37m\n\n", getElement(msgId)->topicName, getElement(msgId)->topicId);
|
||||
DISPLAY("\033[0m\033[0;32m Topic \"%s\" was Unsubscribed. \033[0m\033[0;37m\n\n", getElement(msgId)->topicName);
|
||||
remove(getElement(msgId));
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user