diff options
author | Ted Lemon <source@isc.org> | 2000-02-02 17:10:43 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2000-02-02 17:10:43 +0000 |
commit | 588af2693028f1cfb9868828a8c3345e727a6d19 (patch) | |
tree | 7e56d31fc89257bb86e616d85ce8e0a40829cc5b /server/confpars.c | |
parent | d970ea7d436a48cffa33c6676abc8cad37d85766 (diff) | |
download | isc-dhcp-588af2693028f1cfb9868828a8c3345e727a6d19.tar.gz |
Support parsing of configuration options in generic blocks.
Diffstat (limited to 'server/confpars.c')
-rw-r--r-- | server/confpars.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/server/confpars.c b/server/confpars.c index 0bd2effb..cc530640 100644 --- a/server/confpars.c +++ b/server/confpars.c @@ -22,7 +22,7 @@ #ifndef lint static char copyright[] = -"$Id: confpars.c,v 1.100 2000/02/01 03:19:56 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; +"$Id: confpars.c,v 1.101 2000/02/02 17:10:43 mellon Exp $ Copyright (c) 1995, 1996 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -491,39 +491,19 @@ int parse_statement (cfile, group, type, host_decl, declaration) default: et = (struct executable_statement *)0; - if (is_identifier (token)) { - option = ((struct option *) - hash_lookup (server_universe.hash, - (const unsigned char *)val, 0)); - if (option) { - token = next_token (&val, cfile); - if (!parse_option_statement - (&et, cfile, 1, option, - supersede_option_statement)) - return declaration; - } - } - - if (!et) { - lose = 0; - if (!parse_executable_statement (&et, cfile, &lose, - context_any)) { - if (!lose) { - if (declaration) + lose = 0; + if (!parse_executable_statement (&et, cfile, &lose, + context_any)) { + if (!lose) { + if (declaration) parse_warn (cfile, "expecting a declaration"); - else + else parse_warn (cfile, "expecting a parameter %s", "or declaration"); - skip_to_semi (cfile); - } - return declaration; + skip_to_semi (cfile); } - } - if (!et) { - parse_warn (cfile, "expecting a %sdeclaration", - declaration ? "" : "parameter or "); return declaration; } insert_statement: |