From: Ted Lemon Date: Mon, 12 Jun 2000 20:19:21 +0000 (+0000) Subject: Fix a couple of problems with the ack and update queue code. X-Git-Tag: V3-BETA-2-PATCH-1~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=999992c91ecf547a9498f988dcae60dd2e460422;p=thirdparty%2Fdhcp.git Fix a couple of problems with the ack and update queue code. --- diff --git a/server/failover.c b/server/failover.c index 82715141e..11a78af4f 100644 --- a/server/failover.c +++ b/server/failover.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: failover.c,v 1.18 2000/06/08 21:29:02 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: failover.c,v 1.19 2000/06/12 20:19:21 mellon Exp $ Copyright (c) 1999-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1585,10 +1585,6 @@ int dhcp_failover_queue_update (struct lease *lease, int immediate) dhcp_failover_ack_queue_remove (state, lease); if (state -> update_queue_head) { - if (state -> update_queue_tail -> next_pending) - lease_dereference - (&state -> update_queue_tail -> next_pending, - MDL); lease_reference (&state -> update_queue_tail -> next_pending, lease, MDL); lease_dereference (&state -> update_queue_tail, MDL); @@ -1607,6 +1603,9 @@ void dhcp_failover_ack_queue_remove (dhcp_failover_state_t *state, { struct lease *lp; + if (!(lease -> flags & ON_ACK_QUEUE)) + return; + if (state -> ack_queue_head == lease) { lease_dereference (&state -> ack_queue_head, MDL); if (lease -> next_pending) {