projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6236f49
)
sd-dhcp-client: do not reset 'secs' when entering INIT-REBOOT
author
Tom Gundersen
<teg@jklm.no>
Thu, 20 Mar 2014 15:21:43 +0000
(16:21 +0100)
committer
Tom Gundersen
<teg@jklm.no>
Thu, 20 Mar 2014 16:07:43 +0000
(17:07 +0100)
Also keep start_time in sync, but that shouldn't matter.
src/libsystemd-network/sd-dhcp-client.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-network/sd-dhcp-client.c
b/src/libsystemd-network/sd-dhcp-client.c
index
5d8efbb
..
6e35ef4
100644
(file)
--- a/
src/libsystemd-network/sd-dhcp-client.c
+++ b/
src/libsystemd-network/sd-dhcp-client.c
@@
-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");