From: Ted Lemon Date: Fri, 20 Apr 2001 20:39:54 +0000 (+0000) Subject: When a release expires or is released, unbill it. X-Git-Tag: V3-RC2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5b9b3c1f96ef7bb727f5cf869036af15cfe9cdca;p=thirdparty%2Fdhcp.git When a release expires or is released, unbill it. --- diff --git a/server/mdb.c b/server/mdb.c index 4c62193a2..97180c01f 100644 --- a/server/mdb.c +++ b/server/mdb.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: mdb.c,v 1.59 2001/04/16 22:32:58 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: mdb.c,v 1.60 2001/04/20 20:39:54 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -1121,6 +1121,9 @@ void make_binding_state_transition (struct lease *lease) if (lease -> on_release) executable_statement_dereference (&lease -> on_release, MDL); + if (lease -> billing_class) + unbill_class (lease, lease -> billing_class); + /* Send the expiry time to the peer. */ lease -> tstp = lease -> ends; } @@ -1160,6 +1163,9 @@ void make_binding_state_transition (struct lease *lease) executable_statement_dereference (&lease -> on_expiry, MDL); + if (lease -> billing_class) + unbill_class (lease, lease -> billing_class); + /* Send the release time (should be == cur_time) to the peer. */ lease -> tstp = lease -> ends;