From: Ted Lemon Date: Mon, 4 Sep 2000 22:28:38 +0000 (+0000) Subject: Never record a state of 'startup.' X-Git-Tag: V3-BETA-2-PATCH-2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c8d29f1b338005b58d6b8c3106dfacc4d90ae571;p=thirdparty%2Fdhcp.git Never record a state of 'startup.' --- diff --git a/server/db.c b/server/db.c index 8a96054f6..9ec9dc6a7 100644 --- a/server/db.c +++ b/server/db.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: db.c,v 1.57 2000/08/31 04:40:05 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: db.c,v 1.58 2000/09/04 22:28:38 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -519,7 +519,10 @@ int write_failover_state (dhcp_failover_state_t *state) t = gmtime (&state -> me.stos); errno = 0; fprintf (db_file, "\n my state %s at %d %d/%02d/%02d %02d:%02d:%02d;", - dhcp_failover_state_name_print (state -> me.state), + /* Never record our state as "startup"! */ + (state -> me.state == startup + ? dhcp_failover_state_name_print (state -> saved_state) + : dhcp_failover_state_name_print (state -> me.state)), t -> tm_wday, t -> tm_year + 1900, t -> tm_mon + 1, t -> tm_mday, t -> tm_hour, t -> tm_min, t -> tm_sec);