diff options
author | Tom <tomut@yahoo.com> | 2020-07-06 17:10:52 -0600 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-07 15:46:58 +0200 |
commit | 419703a1f23509cde3e386e6f918141f320cfc48 (patch) | |
tree | c818ec9cbc57f36ca40203010a3a35c65b6a412e /Kernel/Net/IPv4Socket.cpp | |
parent | 1493dd9dc628c4fceb005109b01b24605f6b22af (diff) | |
download | serenity-419703a1f23509cde3e386e6f918141f320cfc48.zip |
Kernel: Fix checking BlockResult
We now have BlockResult::WokeNormally and BlockResult::NotBlocked,
both of which indicate no error. We can no longer just check for
BlockResult::WokeNormally and assume anything else must be an
interruption.
Diffstat (limited to 'Kernel/Net/IPv4Socket.cpp')
-rw-r--r-- | Kernel/Net/IPv4Socket.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Net/IPv4Socket.cpp b/Kernel/Net/IPv4Socket.cpp index 6371808c0f..fb8d179601 100644 --- a/Kernel/Net/IPv4Socket.cpp +++ b/Kernel/Net/IPv4Socket.cpp @@ -250,7 +250,7 @@ ssize_t IPv4Socket::receive_byte_buffered(FileDescription& description, void* bu locker.lock(); if (!m_can_read) { - if (res != Thread::BlockResult::WokeNormally) + if (res.was_interrupted()) return -EINTR; // Unblocked due to timeout. @@ -300,7 +300,7 @@ ssize_t IPv4Socket::receive_packet_buffered(FileDescription& description, void* locker.lock(); if (!m_can_read) { - if (res != Thread::BlockResult::WokeNormally) + if (res.was_interrupted()) return -EINTR; // Unblocked due to timeout. |