Rename client_state_t init variable to program_init.

Easier to grep.  No functional change.
This commit is contained in:
Nicholas J. Kain 2017-01-19 05:05:35 -05:00
parent 931530786b
commit 571b22c4b2
4 changed files with 5 additions and 5 deletions

View File

@ -495,7 +495,7 @@ int arp_collision_timeout(struct client_state_t cs[static 1], long long nowts)
log_line("%s: Lease of %s obtained. Lease time is %ld seconds.",
client_config.interface, clibuf, cs->lease);
cs->clientAddr = garp.dhcp_packet.yiaddr;
cs->init = false;
cs->program_init = false;
garp.last_conflict_ts = 0;
garp.wake_ts[AS_COLLISION_CHECK] = -1;
if (ifchange_bind(cs, &garp.dhcp_packet) < 0) {

View File

@ -74,7 +74,7 @@
#include "rfkill.h"
struct client_state_t cs = {
.init = true,
.program_init = true,
.epollFd = -1,
.signalFd = -1,
.listenFd = -1,

View File

@ -46,7 +46,7 @@ struct client_state_t {
uint32_t lease, xid;
uint8_t routerArp[6], serverArp[6];
bool using_dhcp_bpf, got_router_arp, got_server_arp, arp_is_defense,
check_fingerprint, init;
check_fingerprint, program_init;
};
struct client_config_t {

View File

@ -340,11 +340,11 @@ static int selecting_packet(struct client_state_t cs[static 1],
static int selecting_timeout(struct client_state_t cs[static 1],
long long nowts)
{
if (cs->init && cs->num_dhcp_requests >= 2) {
if (cs->program_init && cs->num_dhcp_requests >= 2) {
if (client_config.background_if_no_lease) {
log_line("%s: No lease; going to background.",
client_config.interface);
cs->init = false;
cs->program_init = false;
background();
} else if (client_config.abort_if_no_lease)
suicide("%s: No lease; failing.", client_config.interface);