mirror of
https://github.com/eclipse/paho.mqtt-sn.embedded-c.git
synced 2025-12-13 15:36:51 +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;
|
return _authorize;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientList::erase(Client* client)
|
void ClientList::erase(Client*& client)
|
||||||
{
|
{
|
||||||
if ( !_authorize && client->erasable())
|
if ( !_authorize && client->erasable())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Tomoaki Yamaguchi - initial API and implementation and/or initial documentation
|
* Tomoaki Yamaguchi - initial API and implementation and/or initial documentation
|
||||||
|
* Tieto Poland Sp. z o.o. - Gateway improvements
|
||||||
**************************************************************************************/
|
**************************************************************************************/
|
||||||
|
|
||||||
#ifndef MQTTSNGWCLIENT_H_
|
#ifndef MQTTSNGWCLIENT_H_
|
||||||
@@ -341,7 +342,7 @@ public:
|
|||||||
ClientList();
|
ClientList();
|
||||||
~ClientList();
|
~ClientList();
|
||||||
bool authorize(const char* fileName);
|
bool authorize(const char* fileName);
|
||||||
void erase(Client*);
|
void erase(Client*&);
|
||||||
Client* getClient(SensorNetAddress* addr);
|
Client* getClient(SensorNetAddress* addr);
|
||||||
Client* getClient(uint8_t* clientId);
|
Client* getClient(uint8_t* clientId);
|
||||||
Client* createClient(SensorNetAddress* addr, MQTTSNString* clientId, bool unstableLine,
|
Client* createClient(SensorNetAddress* addr, MQTTSNString* clientId, bool unstableLine,
|
||||||
|
|||||||
Reference in New Issue
Block a user