summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-04-24 00:55:31 +0000
committerTed Lemon <source@isc.org>2001-04-24 00:55:31 +0000
commit18529fb0c53051de566372fd24b9754ca6ac2210 (patch)
tree9a7470e2c196ea401bda9c5876cafa0a528eccf3
parent3a4f23b5c44a8eaf5e2df62514dfdb8603b1f610 (diff)
downloadisc-dhcp-18529fb0c53051de566372fd24b9754ca6ac2210.tar.gz
Unbill classes before dereferencing them.
-rw-r--r--server/mdb.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/mdb.c b/server/mdb.c
index 97180c01..ab131f7b 100644
--- a/server/mdb.c
+++ b/server/mdb.c
@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
-"$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";
+"$Id: mdb.c,v 1.61 2001/04/24 00:55:31 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -1104,6 +1104,7 @@ void make_binding_state_transition (struct lease *lease)
#if defined (NSUPDATE)
ddns_removals (lease);
#endif
+log_info ("expiry event.");
if (lease -> on_expiry) {
execute_statements ((struct binding_value **)0,
(struct packet *)0, lease,
@@ -1146,6 +1147,7 @@ void make_binding_state_transition (struct lease *lease)
#if defined (NSUPDATE)
ddns_removals (lease);
#endif
+log_info ("release event.");
if (lease -> on_release) {
execute_statements ((struct binding_value **)0,
(struct packet *)0, lease,
@@ -1329,7 +1331,7 @@ void release_lease (lease, packet)
lease -> next_binding_state = FTS_FREE;
#endif
if (lease -> billing_class)
- class_dereference (&lease -> billing_class, MDL);
+ unbill_class (&lease -> billing_class, MDL);
supersede_lease (lease, (struct lease *)0, 1, 1, 1);
}
}
@@ -1371,7 +1373,7 @@ void abandon_lease (lease, message)
lt -> uid_len = 0;
lt -> uid_max = 0;
if (lt -> billing_class)
- class_dereference (&lt -> billing_class, MDL);
+ unbill_class (&lt -> billing_class, MDL);
supersede_lease (lease, lt, 1, 1, 1);
lease_dereference (&lt, MDL);
}
@@ -1417,7 +1419,7 @@ void dissociate_lease (lease)
lt -> uid_len = 0;
lt -> uid_max = 0;
if (lt -> billing_class)
- class_dereference (&lt -> billing_class, MDL);
+ unbill_class (&lt -> billing_class, MDL);
supersede_lease (lease, lt, 1, 1, 1);
lease_dereference (&lt, MDL);
}