From f8a60d811aa3545eb1617fdf806b6bd39351d21d Mon Sep 17 00:00:00 2001 From: tomoaki Date: Sat, 23 May 2020 10:41:17 +0900 Subject: [PATCH] BugFix of #205 Signed-off-by: tomoaki --- MQTTSNGateway/src/MQTTSNGWClientRecvTask.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/MQTTSNGateway/src/MQTTSNGWClientRecvTask.cpp b/MQTTSNGateway/src/MQTTSNGWClientRecvTask.cpp index 7ca2929..c44d95b 100644 --- a/MQTTSNGateway/src/MQTTSNGWClientRecvTask.cpp +++ b/MQTTSNGateway/src/MQTTSNGWClientRecvTask.cpp @@ -192,8 +192,11 @@ void ClientRecvTask::run() { if ( client ) { - /* Client exists. Set SensorNet Address of it. */ - client->setClientAddress(senderAddr); + /* Client exists. Set SensorNet Address of it, if Client is not secure one. */ + if ( !client->isSecureNetwork() ) + { + client->setClientAddress(senderAddr); + } } else {