why the complication of a static string rather than a define? gcc isn't dumb
This commit is contained in:
parent
4b77acafa6
commit
8b3845106a
@ -5,7 +5,9 @@
|
|||||||
#include <netinet/ip.h>
|
#include <netinet/ip.h>
|
||||||
#include <netinet/udp.h>
|
#include <netinet/udp.h>
|
||||||
|
|
||||||
|
#include "libbb_udhcp.h"
|
||||||
#include "leases.h"
|
#include "leases.h"
|
||||||
|
#include "version.h"
|
||||||
|
|
||||||
/************************************/
|
/************************************/
|
||||||
/* Defaults _you_ may want to tweak */
|
/* Defaults _you_ may want to tweak */
|
||||||
@ -13,6 +15,7 @@
|
|||||||
|
|
||||||
/* the period of time the client is allowed to use that address */
|
/* the period of time the client is allowed to use that address */
|
||||||
#define LEASE_TIME (60*60*24*10) /* 10 days of seconds */
|
#define LEASE_TIME (60*60*24*10) /* 10 days of seconds */
|
||||||
|
#define LEASES_FILE "/var/lib/misc/udhcpd.leases"
|
||||||
|
|
||||||
/* where to find the DHCP server configuration file */
|
/* where to find the DHCP server configuration file */
|
||||||
#define DHCPD_CONF_FILE "/etc/udhcpd.conf"
|
#define DHCPD_CONF_FILE "/etc/udhcpd.conf"
|
||||||
|
@ -43,7 +43,7 @@ int main(int argc, char *argv[])
|
|||||||
FILE *fp;
|
FILE *fp;
|
||||||
int i, c, mode = REMAINING;
|
int i, c, mode = REMAINING;
|
||||||
long expires;
|
long expires;
|
||||||
const char *file = leases_file;
|
const char *file = LEASES_FILE;
|
||||||
struct dhcpOfferedAddr lease;
|
struct dhcpOfferedAddr lease;
|
||||||
struct in_addr addr;
|
struct in_addr addr;
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ static const struct config_keyword keywords[] = {
|
|||||||
{"conflict_time",read_u32,&(server_config.conflict_time),"3600"},
|
{"conflict_time",read_u32,&(server_config.conflict_time),"3600"},
|
||||||
{"offer_time", read_u32, &(server_config.offer_time), "60"},
|
{"offer_time", read_u32, &(server_config.offer_time), "60"},
|
||||||
{"min_lease", read_u32, &(server_config.min_lease), "60"},
|
{"min_lease", read_u32, &(server_config.min_lease), "60"},
|
||||||
{"lease_file", read_str, &(server_config.lease_file), leases_file},
|
{"lease_file", read_str, &(server_config.lease_file), LEASES_FILE},
|
||||||
{"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"},
|
{"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"},
|
||||||
{"notify_file", read_str, &(server_config.notify_file), ""},
|
{"notify_file", read_str, &(server_config.notify_file), ""},
|
||||||
{"siaddr", read_ip, &(server_config.siaddr), "0.0.0.0"},
|
{"siaddr", read_ip, &(server_config.siaddr), "0.0.0.0"},
|
||||||
|
Loading…
Reference in New Issue
Block a user