mirror of
https://github.com/systemd/systemd.git
synced 2025-01-27 18:04:05 +03:00
sd-dhcp-client: do not reset 'secs' when entering INIT-REBOOT
Also keep start_time in sync, but that shouldn't matter.
This commit is contained in:
parent
6236f49b23
commit
58ec2d3e6e
@ -198,8 +198,6 @@ static int client_initialize(sd_dhcp_client *client) {
|
||||
|
||||
client->attempt = 1;
|
||||
|
||||
client->start_time = 0;
|
||||
client->secs = 0;
|
||||
client->state = DHCP_STATE_INIT;
|
||||
client->xid = 0;
|
||||
|
||||
@ -592,10 +590,12 @@ static int client_start(sd_dhcp_client *client) {
|
||||
client_stop(client, r);
|
||||
return r;
|
||||
}
|
||||
|
||||
client->fd = r;
|
||||
client->start_time = now(CLOCK_MONOTONIC);
|
||||
client->secs = 0;
|
||||
|
||||
if (client->state == DHCP_STATE_INIT) {
|
||||
client->start_time = now(CLOCK_MONOTONIC);
|
||||
client->secs = 0;
|
||||
}
|
||||
|
||||
log_dhcp_client(client, "STARTED");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user