mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 07:26:52 +01:00
Set pointer to client to 0 when client was erased
Signed-off-by: Mariusz Suchora <mariusz.suchora@tieto.com>
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user