Commit 66942133 authored by Vladimír Čunát's avatar Vladimír Čunát Committed by Petr Špaček

daemon sendmmsg: fix a minor TODO

This shouldn't change the operation in any way, it's just nicer.
parent 36a0aba0
Pipeline #53980 canceled with stages
in 16 minutes and 10 seconds
......@@ -1169,12 +1169,12 @@ static int qr_task_finalize(struct qr_task *task, int state)
ret = kr_error(EINVAL);
} else if (src_handle->type == UV_UDP && ENABLE_SENDMMSG) {
/* TODO: this is an ugly way of getting the FD number, as we're
* touching a private field of UV. We might want to e.g. pass
* a pointer to struct endpoint in kr_request::qsource. */
const int fd = ((const uv_udp_t *)src_handle)->io_watcher.fd;
udp_queue_push(fd, &ctx->req, task);
ret = 0;
int fd;
ret = uv_fileno(src_handle, &fd);
if (ret == 0) {
udp_queue_push(fd, &ctx->req, task);
} else {
ret = qr_task_send(task, source_session, &ctx->source.addr.ip, ctx->req.answer);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment