osmo_io_poll: Use -errno as result on read error

Related: OS#5751
Change-Id: Ida63b74feecddf96bab7b2ade4e9ad216fe56e06
This commit is contained in:
Andreas Eversberg 2024-02-14 14:33:10 +01:00
parent 215399fcf5
commit 4591b30b11
1 changed files with 1 additions and 1 deletions

View File

@ -73,7 +73,7 @@ static void iofd_poll_ofd_cb_recvmsg_sendmsg(struct osmo_fd *ofd, unsigned int w
if (rc > 0)
msgb_put(msg, rc);
iofd_handle_recv(iofd, msg, rc, &hdr);
iofd_handle_recv(iofd, msg, (rc < 0 && errno > 0) ? -errno : rc, &hdr);
}
if (IOFD_FLAG_ISSET(iofd, IOFD_FLAG_CLOSED))