]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Notice if a lease is billed when it's already been billed.
authorTed Lemon <source@isc.org>
Fri, 20 Apr 2001 20:39:26 +0000 (20:39 +0000)
committerTed Lemon <source@isc.org>
Fri, 20 Apr 2001 20:39:26 +0000 (20:39 +0000)
server/class.c

index 290b7ce299bce26d9696be40488984c2343a8911..5b89bcca84eb583efaff35f44cc3dab690a35d09 100644 (file)
@@ -43,7 +43,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: class.c,v 1.28 2001/04/06 05:45:45 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: class.c,v 1.29 2001/04/20 20:39:26 mellon Exp $ Copyright (c) 1998-2000 The Internet Software Consortium.  All rights reserved.\n";
 
 #endif /* not lint */
 
@@ -268,6 +268,11 @@ int bill_class (lease, class)
 {
        int i;
 
+       if (lease -> billing_class) {
+               log_error ("lease billed with existing billing arrangement.");
+               unbill_class (lease, lease -> billing_class);
+       }
+
        if (class -> leases_consumed == class -> lease_limit)
                return 0;