]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/io tty: use more proper uv_ type
authorVladimír Čunát <vladimir.cunat@nic.cz>
Tue, 15 Sep 2020 16:06:02 +0000 (18:06 +0200)
committerVladimír Čunát <vladimir.cunat@nic.cz>
Fri, 2 Oct 2020 06:50:26 +0000 (08:50 +0200)
These are not TCP connections.  It has worked fine so far, but...

daemon/io.c

index c9c2f343770374d5b337f76c9c1627763329d9fc..266aece55b5f0044f5d86a559cae1bda7ae5d398 100644 (file)
@@ -646,12 +646,12 @@ void io_tty_accept(uv_stream_t *master, int status)
 {
        struct io_stream_data *data = io_tty_alloc_data();
        /* We can't use any allocations after mp_start() and it's easier anyway. */
-       uv_tcp_t *client = malloc(sizeof(*client));
+       uv_pipe_t *client = malloc(sizeof(*client));
        client->data = data;
 
        struct args *args = the_args;
        if (client && client->data) {
-                uv_tcp_init(master->loop, client);
+                uv_pipe_init(master->loop, client, 0);
                 if (uv_accept(master, (uv_stream_t *)client) != 0) {
                        mp_delete(data->pool->ctx);
                        return;