MCPcopy Create free account
hub / github.com/axboe/liburing / send_error

Function send_error

examples/proxy.c:1721–1737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1719}
1720
1721static int send_error(struct error_handler *err, struct io_uring *ring,
1722 struct io_uring_cqe *cqe)
1723{
1724 struct conn *c = cqe_to_conn(cqe);
1725 struct conn_dir *cd = cqe_to_conn_dir(c, cqe);
1726
1727 cd->pending_send = 0;
1728
1729 /* res can have high bit set */
1730 if (cqe->flags & IORING_CQE_F_NOTIF)
1731 return handle_send(ring, cqe);
1732 if (cqe->res != -ENOBUFS)
1733 return default_error(err, ring, cqe);
1734
1735 cd->snd_enobufs++;
1736 return 0;
1737}
1738
1739/*
1740 * We don't expect to get here, as we marked it with skipping posting a

Callers

nothing calls this directly

Calls 4

cqe_to_connFunction · 0.85
cqe_to_conn_dirFunction · 0.85
default_errorFunction · 0.85
handle_sendFunction · 0.70

Tested by

no test coverage detected