diff --git a/MQTTSNGateway/src/MQTTSNGWClient.cpp b/MQTTSNGateway/src/MQTTSNGWClient.cpp index ad7f48b..c0a7d03 100644 --- a/MQTTSNGateway/src/MQTTSNGWClient.cpp +++ b/MQTTSNGateway/src/MQTTSNGWClient.cpp @@ -124,7 +124,7 @@ bool ClientList::authorize(const char* fileName) return _authorize; } -void ClientList::erase(Client* client) +void ClientList::erase(Client*& client) { if ( !_authorize && client->erasable()) { diff --git a/MQTTSNGateway/src/MQTTSNGWClient.h b/MQTTSNGateway/src/MQTTSNGWClient.h index 690f98b..3b52fa1 100644 --- a/MQTTSNGateway/src/MQTTSNGWClient.h +++ b/MQTTSNGateway/src/MQTTSNGWClient.h @@ -12,6 +12,7 @@ * * Contributors: * Tomoaki Yamaguchi - initial API and implementation and/or initial documentation + * Tieto Poland Sp. z o.o. - Gateway improvements **************************************************************************************/ #ifndef MQTTSNGWCLIENT_H_ @@ -341,7 +342,7 @@ public: ClientList(); ~ClientList(); bool authorize(const char* fileName); - void erase(Client*); + void erase(Client*&); Client* getClient(SensorNetAddress* addr); Client* getClient(uint8_t* clientId); Client* createClient(SensorNetAddress* addr, MQTTSNString* clientId, bool unstableLine,