From 799d00e84c0328fead9b68ac33dc7dd11b34adb1 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 17 Jun 2009 13:44:04 +0200 Subject: udhcp: convert old-style logging in print_static_leases Signed-off-by: Denys Vlasenko --- networking/udhcp/dhcpd.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'networking/udhcp/dhcpd.h') diff --git a/networking/udhcp/dhcpd.h b/networking/udhcp/dhcpd.h index 42a4b2782..67cb78ce7 100644 --- a/networking/udhcp/dhcpd.h +++ b/networking/udhcp/dhcpd.h @@ -5,17 +5,14 @@ PUSH_AND_SET_FUNCTION_VISIBILITY_TO_HIDDEN -/************************************/ -/* Defaults _you_ may want to tweak */ -/************************************/ - -/* the period of time the client is allowed to use that address */ -#define LEASE_TIME (60*60*24*10) /* 10 days of seconds */ -#define LEASES_FILE CONFIG_DHCPD_LEASES_FILE - -/* where to find the DHCP server configuration file */ +/* Defaults you may want to tweak */ +/* Default max_lease_sec */ +#define LEASE_TIME (60*60*24 * 10) +#define LEASES_FILE CONFIG_DHCPD_LEASES_FILE +/* Where to find the DHCP server configuration file */ #define DHCPD_CONF_FILE "/etc/udhcpd.conf" + struct option_set { uint8_t *data; struct option_set *next; @@ -119,7 +116,11 @@ uint32_t get_static_nip_by_mac(struct static_lease *st_lease, void *arg) FAST_FU /* Check to see if an IP is reserved as a static IP */ int is_nip_reserved(struct static_lease *st_lease, uint32_t nip) FAST_FUNC; /* Print out static leases just to check what's going on (debug code) */ -void print_static_leases(struct static_lease **st_lease_pp) FAST_FUNC; +#if defined CONFIG_UDHCP_DEBUG && CONFIG_UDHCP_DEBUG >= 2 +void log_static_leases(struct static_lease **st_lease_pp) FAST_FUNC; +#else +# define log_static_leases(st_lease_pp) ((void)0) +#endif /*** serverpacket.h ***/ -- cgit v1.2.3