From: Ted Lemon Date: Tue, 5 Oct 1999 00:03:24 +0000 (+0000) Subject: Move handling of on_release hooks and nsupdate to release_lease() X-Git-Tag: V3-BETA-1-PATCH-2~5^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1615a0987c8e2fb953d53bd6c76eeb5a76e80cef;p=thirdparty%2Fdhcp.git Move handling of on_release hooks and nsupdate to release_lease() --- diff --git a/server/mdb.c b/server/mdb.c index 88b5f1bde..c4144f988 100644 --- a/server/mdb.c +++ b/server/mdb.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: mdb.c,v 1.3 1999/10/01 03:26:45 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; +"$Id: mdb.c,v 1.4 1999/10/05 00:03:24 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -993,6 +993,20 @@ void release_lease (lease) { struct lease lt; +#if defined (NSUPDATE) && 0 + nsupdate (lease, lease -> state, packet, DELETE); +#endif + + /* If there are statements to execute when the lease is + committed, execute them. */ + if (lease -> on_release) { + execute_statements (packet, lease, packet -> options, + (struct option_state *)0, /* XXX */ + lease -> on_release); + executable_statement_dereference (&lease -> on_release, + "dhcprelease"); + } + lt = *lease; if (lt.ends > cur_time) { lt.ends = cur_time;