gdhcp: Don't try to remove timer again 78/60678/3 accepted/tizen/common/20160406.145254 accepted/tizen/ivi/20160407.000831 accepted/tizen/mobile/20160407.000743 accepted/tizen/tv/20160407.000800 accepted/tizen/wearable/20160407.000819 submit/tizen/20160406.101500
authorSaurav Babu <saurav.babu@samsung.com>
Tue, 1 Mar 2016 11:48:00 +0000 (17:18 +0530)
committerSaurav Babu <saurav.babu@samsung.com>
Wed, 30 Mar 2016 07:06:46 +0000 (00:06 -0700)
commitfd8bf31be4014a87855d006ec50b44d4c3cf40a4
tree6ab34bd693199978735b726f1d8323e8a844ee8c
parent3b33d7ad0367cc5b49d4599d59c75e983c4549c7
gdhcp: Don't try to remove timer again

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>
gdhcp/client.c