mirror of https://gerrit.osmocom.org/libosmocore
osmo_io_poll: Use -errno as result on write error
This was done for read error in a previous patch. This is required because osmo_io_uring does not support errno, instead it uses the result code. To have a unified API, set the result code equally. Related: OS#5751 Change-Id: I405094449a6644db37534757f2fbccbcff982f23
This commit is contained in:
parent
8b7af448d6
commit
28c97a7238
|
@ -84,7 +84,7 @@ static void iofd_poll_ofd_cb_recvmsg_sendmsg(struct osmo_fd *ofd, unsigned int w
|
|||
struct iofd_msghdr *msghdr = iofd_txqueue_dequeue(iofd);
|
||||
if (msghdr) {
|
||||
rc = sendmsg(ofd->fd, &msghdr->hdr, msghdr->flags);
|
||||
iofd_handle_send_completion(iofd, rc, msghdr);
|
||||
iofd_handle_send_completion(iofd, (rc < 0 && errno > 0) ? -errno : rc, msghdr);
|
||||
} else {
|
||||
/* Socket is writable, but we have no data to send. A non-blocking/async
|
||||
connect() is signalled this way. */
|
||||
|
|
Loading…
Reference in New Issue