mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-30 13:57:50 +00:00
Release old billing class when parsing new billing class.
This commit is contained in:
@@ -43,7 +43,7 @@
|
|||||||
|
|
||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char copyright[] =
|
static char copyright[] =
|
||||||
"$Id: confpars.c,v 1.137 2001/03/17 02:02:20 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
|
"$Id: confpars.c,v 1.138 2001/04/06 05:52:19 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
|
||||||
#endif /* not lint */
|
#endif /* not lint */
|
||||||
|
|
||||||
#include "dhcpd.h"
|
#include "dhcpd.h"
|
||||||
@@ -2635,6 +2635,9 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
|
|||||||
token = BILLING;
|
token = BILLING;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (lease -> billing_class)
|
||||||
|
unbill_class (lease,
|
||||||
|
lease -> billing_class);
|
||||||
find_class (&lease -> billing_class, val, MDL);
|
find_class (&lease -> billing_class, val, MDL);
|
||||||
if (!lease -> billing_class)
|
if (!lease -> billing_class)
|
||||||
parse_warn (cfile,
|
parse_warn (cfile,
|
||||||
@@ -2642,8 +2645,8 @@ int parse_lease_declaration (struct lease **lp, struct parse *cfile)
|
|||||||
parse_semi (cfile);
|
parse_semi (cfile);
|
||||||
} else if (token == SUBCLASS) {
|
} else if (token == SUBCLASS) {
|
||||||
if (lease -> billing_class)
|
if (lease -> billing_class)
|
||||||
class_dereference
|
unbill_class (lease,
|
||||||
(&lease -> billing_class, MDL);
|
lease -> billing_class);
|
||||||
parse_class_declaration
|
parse_class_declaration
|
||||||
(&lease -> billing_class,
|
(&lease -> billing_class,
|
||||||
cfile, (struct group *)0, 3);
|
cfile, (struct group *)0, 3);
|
||||||
|
Reference in New Issue
Block a user