Send connman mailing list submissions to
        [email protected]

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.01.org/mailman/listinfo/connman
or, via email, send a message with subject or body 'help' to
        [email protected]

You can reach the person managing the list at
        [email protected]

When replying, please edit your Subject line so it is more specific
than "Re: Contents of connman digest..."


Today's Topics:

   1. [PATCHv3] gdhcp: Don't try to remove timer again (Saurav Babu)


----------------------------------------------------------------------

Message: 1
Date: Thu, 28 Jan 2016 18:24:51 +0530
From: Saurav Babu <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: [PATCHv3] gdhcp: Don't try to remove timer again
Message-ID:
        <[email protected]>

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.
---

v3: Removes any possible remaining timeouts in g_dhcp_client_start() instead of
assigning dhcp_client->timeout to 0 just before calling g_dhcp_client_start()
in discover_timeout

 gdhcp/client.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gdhcp/client.c b/gdhcp/client.c
index f9cba89..6b24679 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -2681,6 +2681,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;
 }
@@ -2713,6 +2714,9 @@ int g_dhcp_client_start(GDHCPClient *dhcp_client, const 
char *last_address)
        uint32_t addr;
        uint64_t rand;
 
+       /* Remove any possible remaining timeout before proceeding further */
+       remove_timeouts(dhcp_client);
+
        if (dhcp_client->type == G_DHCP_IPV6) {
                if (dhcp_client->information_req_cb) {
                        dhcp_client->state = INFORMATION_REQ;
-- 
1.9.1



------------------------------

Subject: Digest Footer

_______________________________________________
connman mailing list
[email protected]
https://lists.01.org/mailman/listinfo/connman


------------------------------

End of connman Digest, Vol 3, Issue 22
**************************************

Reply via email to