From c11f349dba7d574dcc9311814b735b0b316cb741 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Tue, 5 Jun 2007 23:28:43 +0000 Subject: [PATCH] Pulled up rt16929 --- RELNOTES | 2 ++ server/db.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELNOTES b/RELNOTES index 01a6295b..c088ec20 100644 --- a/RELNOTES +++ b/RELNOTES @@ -59,6 +59,8 @@ suggested fixes to . - A bug was fixed in interface discovery wherein an error identifying a server-configured interface with no IPv4 addresses would SEGV. +- Fixed a bug in which write_lease() might report a failure incorrectly + Changes since 4.0.0-20070413 - Old (expired) leases are now cleaned. diff --git a/server/db.c b/server/db.c index aa34e24a..d33104f7 100644 --- a/server/db.c +++ b/server/db.c @@ -34,7 +34,7 @@ #ifndef lint static char copyright[] = -"$Id: db.c,v 1.79 2007/05/29 18:11:56 each Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; +"$Id: db.c,v 1.80 2007/06/05 23:28:43 each Exp $ Copyright (c) 2004-2007 Internet Systems Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -147,6 +147,7 @@ int write_lease (lease) int i; s = quotify_buf (lease -> uid, lease -> uid_len, MDL); if (s) { + errno = 0; fprintf (db_file, "\n uid \"%s\";", s); if (errno) ++errors;