diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..85e7c1d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.idea/ diff --git a/Gateway/src/GatewayControlTask.cpp b/Gateway/src/GatewayControlTask.cpp index 4b0350e..bc1a47b 100644 --- a/Gateway/src/GatewayControlTask.cpp +++ b/Gateway/src/GatewayControlTask.cpp @@ -278,7 +278,7 @@ void GatewayControlTask::handleSnPublish(Event* ev, ClientNode* clnode, MQTTSnMe Topic* tp = clnode->getTopics()->getTopic(sPublish->getTopicId()); - if(tp || ((sPublish->getFlags() && MQTTSN_TOPIC_TYPE) == MQTTSN_TOPIC_TYPE_SHORT)){ + if(tp || ((sPublish->getFlags() & MQTTSN_TOPIC_TYPE) == MQTTSN_TOPIC_TYPE_SHORT)){ if(tp){ mqMsg->setTopic(tp->getTopicName()); }else{