mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:55:08 +00:00
Kernel: Use WeakPtr<NetworkAdapter> instead of NetworkAdapter* in net code
This commit is contained in:
parent
d6bce37756
commit
54ceabd48d
9 changed files with 28 additions and 16 deletions
|
@ -56,7 +56,7 @@ int UDPSocket::protocol_receive(const KBuffer& packet_buffer, void* buffer, size
|
|||
|
||||
int UDPSocket::protocol_send(const void* data, int data_length)
|
||||
{
|
||||
auto* adapter = adapter_for_route_to(peer_address());
|
||||
auto adapter = adapter_for_route_to(peer_address());
|
||||
if (!adapter)
|
||||
return -EHOSTUNREACH;
|
||||
auto buffer = ByteBuffer::create_zeroed(sizeof(UDPPacket) + data_length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue