2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-03 15:56:00 +00:00

Fix some trace-related ifdefs.

This commit is contained in:
Ted Lemon
2001-02-12 21:59:31 +00:00
parent d8a44b0761
commit 662df45ac0
2 changed files with 11 additions and 3 deletions

View File

@@ -43,7 +43,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: confpars.c,v 1.132 2001/02/12 20:53:04 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; "$Id: confpars.c,v 1.133 2001/02/12 21:59:30 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@@ -53,7 +53,6 @@ static TIME parsed_time;
#if defined (TRACING) #if defined (TRACING)
trace_type_t *trace_readconf_type; trace_type_t *trace_readconf_type;
trace_type_t *trace_readleases_type; trace_type_t *trace_readleases_type;
#endif
void parse_trace_setup () void parse_trace_setup ()
{ {
@@ -64,6 +63,7 @@ void parse_trace_setup ()
trace_conf_input, trace_conf_input,
trace_conf_stop, MDL); trace_conf_stop, MDL);
} }
#endif
/* conf-file :== parameters declarations EOF /* conf-file :== parameters declarations EOF
parameters :== <nil> | parameter | parameters parameter parameters :== <nil> | parameter | parameters parameter

View File

@@ -43,7 +43,7 @@
#ifndef lint #ifndef lint
static char ocopyright[] = static char ocopyright[] =
"$Id: dhcpd.c,v 1.110 2001/02/12 21:04:06 mellon Exp $ Copyright 1995-2001 Internet Software Consortium."; "$Id: dhcpd.c,v 1.111 2001/02/12 21:59:31 mellon Exp $ Copyright 1995-2001 Internet Software Consortium.";
#endif #endif
static char copyright[] = static char copyright[] =
@@ -210,8 +210,10 @@ int main (argc, argv, envp)
int no_dhcpd_conf = 0; int no_dhcpd_conf = 0;
int no_dhcpd_db = 0; int no_dhcpd_db = 0;
int no_dhcpd_pid = 0; int no_dhcpd_pid = 0;
#if defined (TRACING)
char *traceinfile = (char *)0; char *traceinfile = (char *)0;
char *traceoutfile = (char *)0; char *traceoutfile = (char *)0;
#endif
/* Set up the client classification system. */ /* Set up the client classification system. */
classification_setup (); classification_setup ();
@@ -300,6 +302,7 @@ int main (argc, argv, envp)
} else if (!strcmp (argv [i], "--version")) { } else if (!strcmp (argv [i], "--version")) {
log_info ("isc-dhcpd-%s", DHCP_VERSION); log_info ("isc-dhcpd-%s", DHCP_VERSION);
exit (0); exit (0);
#if defined (TRACING)
} else if (!strcmp (argv [i], "-tf")) { } else if (!strcmp (argv [i], "-tf")) {
if (++i == argc) if (++i == argc)
usage (); usage ();
@@ -309,6 +312,7 @@ int main (argc, argv, envp)
usage (); usage ();
traceinfile = argv [i]; traceinfile = argv [i];
trace_replay_init (); trace_replay_init ();
#endif /* TRACING */
} else if (argv [i][0] == '-') { } else if (argv [i][0] == '-') {
usage (); usage ();
} else { } else {
@@ -847,8 +851,12 @@ static void usage ()
log_fatal ("Usage: dhcpd [-p <UDP port #>] [-d] [-f]%s%s%s%s", log_fatal ("Usage: dhcpd [-p <UDP port #>] [-d] [-f]%s%s%s%s",
"\n [-cf config-file] [-lf lease-file]", "\n [-cf config-file] [-lf lease-file]",
#if defined (TRACING)
"\n [-tf trace-output-file]", "\n [-tf trace-output-file]",
"\n [-play trace-input-file]", "\n [-play trace-input-file]",
#else
"", "",
#endif /* TRACING */
"\n [-t] [-T] [-s server] [if0 [...ifN]]"); "\n [-t] [-T] [-s server] [if0 [...ifN]]");
} }