From: Ted Lemon Date: Fri, 16 Mar 2001 01:56:32 +0000 (+0000) Subject: - Return a correct status in lease_ours_to_reallocate even if the lease isn't X-Git-Tag: V3-BETA-2-PATCH-19~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d588b01f6eba4008d8c385d67877e20f186574c6;p=thirdparty%2Fdhcp.git - Return a correct status in lease_ours_to_reallocate even if the lease isn't in a failover pool. --- diff --git a/server/failover.c b/server/failover.c index feedc1183..fa079cc1f 100644 --- a/server/failover.c +++ b/server/failover.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: failover.c,v 1.39 2001/03/14 17:40:59 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n"; +"$Id: failover.c,v 1.40 2001/03/16 01:56:32 mellon Exp $ Copyright (c) 1999-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -4698,7 +4698,11 @@ int lease_mine_to_reallocate (struct lease *lease) } return 0; } - return 1; + if (lease) + return !(lease -> binding_state != FTS_FREE && + lease -> binding_state != FTS_BACKUP); + else + return 0; } static isc_result_t failover_message_reference (failover_message_t **mp,