ELOOP_QUEUE 0 is now all queues

This allows DHCPv6 and IPv6RS to remove DAD callbacks from the IPv6NS queue.
This commit is contained in:
Roy Marples 2013-05-16 14:42:18 +00:00
parent 5fe587be91
commit e6ca60eea6
5 changed files with 7 additions and 7 deletions

View File

@ -44,7 +44,7 @@
#include <syslog.h> #include <syslog.h>
#include <unistd.h> #include <unistd.h>
#define ELOOP_QUEUE 2 #define ELOOP_QUEUE 3
#include "config.h" #include "config.h"
#include "common.h" #include "common.h"
@ -608,7 +608,7 @@ dhcp6_freedrop_addrs(struct interface *ifp, int drop)
while ((ap = TAILQ_FIRST(&state->addrs))) { while ((ap = TAILQ_FIRST(&state->addrs))) {
TAILQ_REMOVE(&state->addrs, ap, next); TAILQ_REMOVE(&state->addrs, ap, next);
if (ap->dadcallback) if (ap->dadcallback)
eloop_timeout_delete(NULL, ap->dadcallback); eloop_q_timeout_delete(0, NULL, ap->dadcallback);
/* Only drop the address if no other RAs have assigned it. /* Only drop the address if no other RAs have assigned it.
* This is safe because the RA is removed from the list * This is safe because the RA is removed from the list
* before we are called. */ * before we are called. */

View File

@ -244,7 +244,7 @@ eloop_q_timeouts_delete_v(int queue, void *arg,
void (*f)(void *); void (*f)(void *);
TAILQ_FOREACH_SAFE(t, &timeouts, next, tt) { TAILQ_FOREACH_SAFE(t, &timeouts, next, tt) {
if (t->queue == queue && t->arg == arg && if ((queue == 0 || t->queue == queue) && t->arg == arg &&
t->callback != callback) t->callback != callback)
{ {
va_copy(va, v); va_copy(va, v);

View File

@ -32,7 +32,7 @@
#include <time.h> #include <time.h>
#ifndef ELOOP_QUEUE #ifndef ELOOP_QUEUE
#define ELOOP_QUEUE 0 #define ELOOP_QUEUE 1
#endif #endif
#define eloop_timeout_add_tv(a, b, c) \ #define eloop_timeout_add_tv(a, b, c) \

View File

@ -46,7 +46,7 @@
# include <linux/ipv6.h> # include <linux/ipv6.h>
#endif #endif
#define ELOOP_QUEUE 1 #define ELOOP_QUEUE 2
#include "common.h" #include "common.h"
#include "dhcpcd.h" #include "dhcpcd.h"
#include "dhcp6.h" #include "dhcp6.h"

View File

@ -45,7 +45,7 @@
#include <syslog.h> #include <syslog.h>
#include <unistd.h> #include <unistd.h>
#define ELOOP_QUEUE 1 #define ELOOP_QUEUE 2
#include "common.h" #include "common.h"
#include "dhcpcd.h" #include "dhcpcd.h"
#include "dhcp6.h" #include "dhcp6.h"
@ -306,7 +306,7 @@ ipv6rs_freedrop_addrs(struct ra *rap, int drop)
while ((ap = TAILQ_FIRST(&rap->addrs))) { while ((ap = TAILQ_FIRST(&rap->addrs))) {
TAILQ_REMOVE(&rap->addrs, ap, next); TAILQ_REMOVE(&rap->addrs, ap, next);
if (ap->dadcallback) if (ap->dadcallback)
eloop_timeout_delete(NULL, ap->dadcallback); eloop_q_timeout_delete(0, NULL, ap->dadcallback);
/* Only drop the address if no other RAs have assigned it. /* Only drop the address if no other RAs have assigned it.
* This is safe because the RA is removed from the list * This is safe because the RA is removed from the list
* before we are called. */ * before we are called. */