]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix prior
authorRoy Marples <roy@marples.name>
Sat, 9 May 2015 10:11:51 +0000 (10:11 +0000)
committerRoy Marples <roy@marples.name>
Sat, 9 May 2015 10:11:51 +0000 (10:11 +0000)
dhcpcd.c
eloop.c

index 7228e9d33bc93c0b2a991cf4cf8609d94fdde5b0..d4546cc05158dc6cd4f34b4a395f1effbdcbd5ef 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1131,7 +1131,6 @@ handle_signal2(void *arg, int sig)
        struct interface *ifp;
        int do_release, exit_code;
 
-       ctx = dhcpcd_ctx;
        do_release = 0;
        exit_code = EXIT_FAILURE;
        switch (sig) {
@@ -1389,7 +1388,9 @@ main(int argc, char **argv)
 
        memset(&ctx, 0, sizeof(ctx));
 #ifdef USE_SIGNALS
+#ifndef HAVE_KQUEUE
        dhcpcd_ctx = &ctx;
+#endif
        sig = 0;
        siga = NULL;
 #endif
diff --git a/eloop.c b/eloop.c
index 56ddeccbe6486c265d1d86b5509555bfc7f830bc..cc8f62d9eb8128c3c1f3c4609b69dc8741b39206 100644 (file)
--- a/eloop.c
+++ b/eloop.c
@@ -421,7 +421,7 @@ eloop_requeue(struct eloop_ctx *ctx)
        if ((ke = malloc(sizeof(*ke) * i)) == NULL)
                return -1;
 
-       for (i = 0; ctx->signal[i] != 0; i++)
+       for (i = 0; ctx->signals[i] != 0; i++)
                EV_SET(&ke[i], (uintptr_t)ctx->signals[i],
                    EVFILT_SIGNAL, EV_ADD, 0, 0, UPTR(NULL));