diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-07-29 14:06:47 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-29 14:07:43 -0700 |
commit | 4166d48c2f6e66ae64bbe921306dbbf830fbb488 (patch) | |
tree | f04656d7c03fd74a839c34395c865382ed8740d2 /gdhcp | |
parent | 8d700f69b7d50061ebcab967d321f09ef63ca0d9 (diff) | |
download | connman-4166d48c2f6e66ae64bbe921306dbbf830fbb488.tar.gz connman-4166d48c2f6e66ae64bbe921306dbbf830fbb488.tar.bz2 connman-4166d48c2f6e66ae64bbe921306dbbf830fbb488.zip |
Remove unused timer code from DHCP library
Diffstat (limited to 'gdhcp')
-rw-r--r-- | gdhcp/client.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c index 45723d73..c163b446 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -99,8 +99,6 @@ struct _GDHCPClient { gpointer debug_data; }; -static GTimer *timer = NULL; - static inline void debug(GDHCPClient *client, const char *format, ...) { char str[256]; @@ -769,12 +767,6 @@ static void start_rebound(GDHCPClient *dhcp_client) static gboolean start_renew_timeout(gpointer user_data) { GDHCPClient *dhcp_client = user_data; - gdouble elapse; - gulong microseconds; - - elapse = g_timer_elapsed(timer, µseconds); - - g_timer_start(timer); dhcp_client->state = RENEWING; @@ -801,11 +793,7 @@ static void start_bound(GDHCPClient *dhcp_client) { dhcp_client->state = BOUND; - if (timer == NULL) - timer = g_timer_new(); - - dhcp_client->timeout = - g_timeout_add_seconds_full(G_PRIORITY_HIGH, + dhcp_client->timeout = g_timeout_add_seconds_full(G_PRIORITY_HIGH, dhcp_client->lease_seconds >> 1, start_renew_timeout, dhcp_client, NULL); |