]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix control queue free argument.
authorRoy Marples <roy@marples.name>
Sat, 10 Aug 2019 15:50:43 +0000 (16:50 +0100)
committerRoy Marples <roy@marples.name>
Sat, 10 Aug 2019 15:50:43 +0000 (16:50 +0100)
src/dhcpcd.c
src/script.c

index 5b64abf49aa3cf0bad8e351c32618464b62887a2..bddd316b5a4a5e1f247b62e628e27447e4bea0cd 100644 (file)
@@ -1440,10 +1440,10 @@ dhcpcd_handleargs(struct dhcpcd_ctx *ctx, struct fd_list *fd,
         * write callback on the fd */
        if (strcmp(*argv, "--version") == 0) {
                return control_queue(fd, UNCONST(VERSION),
-                   strlen(VERSION) + 1, 0);
+                   strlen(VERSION) + 1, false);
        } else if (strcmp(*argv, "--getconfigfile") == 0) {
                return control_queue(fd, UNCONST(fd->ctx->cffile),
-                   strlen(fd->ctx->cffile) + 1, 0);
+                   strlen(fd->ctx->cffile) + 1, false);
        } else if (strcmp(*argv, "--getinterfaces") == 0) {
                eloop_event_add_w(fd->ctx->eloop, fd->fd,
                    dhcpcd_getinterfaces, fd);
index 9cb83e08131d1d4784ce7753c58e6699a4593777..2e9a2f9b37e3128c88263fb0a9771edaee7273b5 100644 (file)
@@ -647,8 +647,8 @@ send_listeners:
        TAILQ_FOREACH(fd, &ctx->control_fds, next) {
                if (!(fd->flags & FD_LISTEN))
                        continue;
-               if (control_queue(fd, ctx->script_buf, ctx->script_buflen, 1)
-                   == -1)
+               if (control_queue(fd, ctx->script_buf, ctx->script_buflen,
+                   true) == -1)
                        logerr("%s: control_queue", __func__);
                else
                        status = 1;