mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 08:04:57 +00:00
Kernel: Accept NNRP<Socket> instead of RP<Socket> in release_for_accept
This value is always non-null, so let's make it explicit.
This commit is contained in:
parent
472a3df03b
commit
4a270c93ed
2 changed files with 4 additions and 4 deletions
|
@ -150,16 +150,16 @@ ErrorOr<NonnullRefPtr<TCPSocket>> TCPSocket::try_create_client(IPv4Address const
|
|||
void TCPSocket::release_to_originator()
|
||||
{
|
||||
VERIFY(!!m_originator);
|
||||
m_originator.strong_ref()->release_for_accept(this);
|
||||
m_originator.strong_ref()->release_for_accept(*this);
|
||||
m_originator.clear();
|
||||
}
|
||||
|
||||
void TCPSocket::release_for_accept(RefPtr<TCPSocket> socket)
|
||||
void TCPSocket::release_for_accept(NonnullRefPtr<TCPSocket> socket)
|
||||
{
|
||||
VERIFY(m_pending_release_for_accept.contains(socket->tuple()));
|
||||
m_pending_release_for_accept.remove(socket->tuple());
|
||||
// FIXME: Should we observe this error somehow?
|
||||
[[maybe_unused]] auto rc = queue_connection_from(*socket);
|
||||
[[maybe_unused]] auto rc = queue_connection_from(move(socket));
|
||||
}
|
||||
|
||||
TCPSocket::TCPSocket(int protocol, NonnullOwnPtr<DoubleBuffer> receive_buffer, NonnullOwnPtr<KBuffer> scratch_buffer)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue