diff options
author | Saurav Babu <saurav.babu@samsung.com> | 2016-03-01 17:18:00 +0530 |
---|---|---|
committer | Saurav Babu <saurav.babu@samsung.com> | 2016-03-30 00:06:46 -0700 |
commit | fd8bf31be4014a87855d006ec50b44d4c3cf40a4 (patch) | |
tree | 6ab34bd693199978735b726f1d8323e8a844ee8c | |
parent | 3b33d7ad0367cc5b49d4599d59c75e983c4549c7 (diff) | |
download | connman-fd8bf31be4014a87855d006ec50b44d4c3cf40a4.tar.gz connman-fd8bf31be4014a87855d006ec50b44d4c3cf40a4.tar.bz2 connman-fd8bf31be4014a87855d006ec50b44d4c3cf40a4.zip |
gdhcp: Don't try to remove timer againsubmit/tizen/20160406.101500accepted/tizen/wearable/20160407.000819accepted/tizen/tv/20160407.000800accepted/tizen/mobile/20160407.000743accepted/tizen/ivi/20160407.000831accepted/tizen/common/20160406.145254
GLib-CRITICAL warning message is obtained in below scenario:
1. service is connected and link local address is obtained.
2. Try to disconnect service.
(connmand:8377): GLib-CRITICAL **: Source ID 289 was not found when
attempting to remove it
(connmand:8377): GLib-CRITICAL **: Source ID 303 was not found when
attempting to remove it
When Link Local IP address is obtained then both dhcp_client->timeout
assigned for DISCOVER_TIMEOUT and ANNOUNCE_INTERVAL are already removed
when discover_timeout() and ipv4ll_announce_timeout() function returns
FALSE but the dhcp_client->timeout is not assigned to 0. Now when
dhcp_release() calls remove_timeouts() function then dhcp_client->timeout
is tried to remove again resulting in GLib-CRITICAL warning. This patch
removes all possible remaing timeouts in g_dhcp_client_start() and
explicitly sets dhcp_client->timeout to 0 in ipv4ll_announce_timeout()
function.
Change-Id: I12b072beef92818a2c1db253c85d1cfea540682b
Signed-off-by: Saurav Babu <saurav.babu@samsung.com>
-rwxr-xr-x | gdhcp/client.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c index 81896136..106c7770 100755 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -2622,6 +2622,7 @@ static gboolean ipv4ll_announce_timeout(gpointer dhcp_data) dhcp_client->ipv4ll_available_cb(dhcp_client, dhcp_client->ipv4ll_available_data); dhcp_client->conflicts = 0; + dhcp_client->timeout = 0; return FALSE; } @@ -2654,6 +2655,8 @@ int g_dhcp_client_start(GDHCPClient *dhcp_client, const char *last_address) uint32_t addr; uint64_t rand; + remove_timeouts(dhcp_client); + if (dhcp_client->type == G_DHCP_IPV6) { if (dhcp_client->information_req_cb) { dhcp_client->state = INFORMATION_REQ; |