mirror of
https://github.com/espressif/openthread.git
synced 2026-08-07 03:07:47 +00:00
[udp6] initialize Socket variables in its constructor (#5902)
This commit is contained in:
@@ -74,7 +74,7 @@ exit:
|
||||
Udp::Socket::Socket(Instance &aInstance)
|
||||
: InstanceLocator(aInstance)
|
||||
{
|
||||
mHandle = nullptr;
|
||||
Clear();
|
||||
}
|
||||
|
||||
Message *Udp::Socket::NewMessage(uint16_t aReserved, const Message::Settings &aSettings)
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
#include <openthread/udp.h>
|
||||
#include <openthread/platform/udp.h>
|
||||
|
||||
#include "common/clearable.hpp"
|
||||
#include "common/linked_list.hpp"
|
||||
#include "common/locator.hpp"
|
||||
#include "common/non_copyable.hpp"
|
||||
@@ -70,7 +71,7 @@ public:
|
||||
* This class implements a UDP/IPv6 socket.
|
||||
*
|
||||
*/
|
||||
class SocketHandle : public otUdpSocket, public LinkedListEntry<SocketHandle>
|
||||
class SocketHandle : public otUdpSocket, public LinkedListEntry<SocketHandle>, public Clearable<SocketHandle>
|
||||
{
|
||||
friend class Udp;
|
||||
friend class LinkedList<SocketHandle>;
|
||||
|
||||
Reference in New Issue
Block a user