summaryrefslogtreecommitdiff
path: root/networking/udhcp/files.c
diff options
context:
space:
mode:
authorDenys Vlasenko2009-06-17 13:24:03 +0200
committerDenys Vlasenko2009-06-17 13:24:03 +0200
commit6947d2c7e194e3be31eed1c75260e15fca1a2568 (patch)
treeff4d67b49e0e7e02e29ecc090db619a39b24498d /networking/udhcp/files.c
parent2b0e95780863da44f6a9244699ece8620a599e19 (diff)
downloadbusybox-6947d2c7e194e3be31eed1c75260e15fca1a2568.zip
busybox-6947d2c7e194e3be31eed1c75260e15fca1a2568.tar.gz
udhcp: logging improvements, field and variable renames
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/files.c')
-rw-r--r--networking/udhcp/files.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index bddf3e1..c3cc2b0 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -295,7 +295,7 @@ static const struct config_keyword keywords[] = {
{"decline_time", read_u32, &(server_config.decline_time), "3600"},
{"conflict_time",read_u32, &(server_config.conflict_time),"3600"},
{"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_sec),"60"},
{"lease_file", read_str, &(server_config.lease_file), LEASES_FILE},
{"pidfile", read_str, &(server_config.pidfile), "/var/run/udhcpd.pid"},
{"siaddr", read_nip, &(server_config.siaddr_nip), "0.0.0.0"},
@@ -359,23 +359,23 @@ void FAST_FUNC write_leases(void)
for (i = 0; i < server_config.max_leases; i++) {
leasetime_t tmp_time;
- if (leases[i].lease_nip == 0)
+ if (g_leases[i].lease_nip == 0)
continue;
/* Screw with the time in the struct, for easier writing */
- tmp_time = leases[i].expires;
+ tmp_time = g_leases[i].expires;
- leases[i].expires -= curr;
- if ((signed_leasetime_t) leases[i].expires < 0)
- leases[i].expires = 0;
- leases[i].expires = htonl(leases[i].expires);
+ g_leases[i].expires -= curr;
+ if ((signed_leasetime_t) g_leases[i].expires < 0)
+ g_leases[i].expires = 0;
+ g_leases[i].expires = htonl(g_leases[i].expires);
/* No error check. If the file gets truncated,
* we lose some leases on restart. Oh well. */
- full_write(fd, &leases[i], sizeof(leases[i]));
+ full_write(fd, &g_leases[i], sizeof(g_leases[i]));
/* Then restore it when done */
- leases[i].expires = tmp_time;
+ g_leases[i].expires = tmp_time;
}
close(fd);