summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeonah Moon <seonah1.moon@samsung.com>2017-03-27 17:35:57 +0900
committerSeonah Moon <seonah1.moon@samsung.com>2017-03-27 17:38:42 +0900
commit2a675d6cae5a359ea30a971ae1c9d2ed4316dd2c (patch)
treeb79773af4f578d98e8e07b6998941b36b48351d5
parentbacbf3b3464c00424ded04da1712e554c09c4625 (diff)
downloadconnman-2a675d6cae5a359ea30a971ae1c9d2ed4316dd2c.tar.gz
connman-2a675d6cae5a359ea30a971ae1c9d2ed4316dd2c.tar.bz2
connman-2a675d6cae5a359ea30a971ae1c9d2ed4316dd2c.zip
[upstream patch] dhcp: Remove the possible remaining dhcp_retry_cb timer
Change-Id: I9759e546298a5ae5cdfccfd629512f475e9ec2e8 Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
-rwxr-xr-xsrc/dhcp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dhcp.c b/src/dhcp.c
index 5b0beab5..b48cdc69 100755
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -257,9 +257,12 @@ static void no_lease_cb(GDHCPClient *dhcp_client, gpointer user_data)
DBG("No lease available ipv4ll %d client %p", ipv4ll_running,
dhcp->ipv4ll_client);
+ if (dhcp->timeout > 0)
+ g_source_remove(dhcp->timeout);
+
dhcp->timeout = g_timeout_add_seconds(RATE_LIMIT_INTERVAL,
- dhcp_retry_cb,
- dhcp);
+ dhcp_retry_cb,
+ dhcp);
if (ipv4ll_running)
return;