diff options
author | Denys Vlasenko | 2009-06-17 13:24:03 +0200 |
---|---|---|
committer | Denys Vlasenko | 2009-06-17 13:24:03 +0200 |
commit | 6947d2c7e194e3be31eed1c75260e15fca1a2568 (patch) | |
tree | ff4d67b49e0e7e02e29ecc090db619a39b24498d /networking/udhcp/files.c | |
parent | 2b0e95780863da44f6a9244699ece8620a599e19 (diff) | |
download | busybox-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.c | 18 |
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); |