summaryrefslogtreecommitdiff
path: root/src/inet.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2011-10-31 15:38:15 (GMT)
committerSamuel Ortiz <sameo@linux.intel.com>2011-11-07 11:35:09 (GMT)
commit73320cf9363e2121b923bca66d63a3664ffd2049 (patch)
tree85296fb1b9a4254b860dc50173e83049cf7e661f /src/inet.c
parent08f53bb1589d50e5c23a77adf9c6ea464a01e452 (diff)
downloadconnman-73320cf9363e2121b923bca66d63a3664ffd2049.zip
connman-73320cf9363e2121b923bca66d63a3664ffd2049.tar.gz
connman-73320cf9363e2121b923bca66d63a3664ffd2049.tar.bz2
inet: Cleanup the router solicitations handler properly
Diffstat (limited to 'src/inet.c')
-rw-r--r--src/inet.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/inet.c b/src/inet.c
index c941718..a2a66da 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -1417,6 +1417,7 @@ struct rs_cb_data {
__connman_inet_rs_cb_t callback;
struct sockaddr_in6 addr;
guint rs_timeout;
+ guint watch_id;
void *user_data;
};
@@ -1439,6 +1440,9 @@ static void rs_cleanup(struct rs_cb_data *data)
if (data->rs_timeout > 0)
g_source_remove(data->rs_timeout);
+ if (data->watch_id > 0)
+ g_source_remove(data->watch_id);
+
g_free(data);
}
@@ -1708,7 +1712,7 @@ int __connman_inet_ipv6_send_rs(int index, int timeout,
g_io_channel_set_encoding(data->channel, NULL, NULL);
g_io_channel_set_buffered(data->channel, FALSE);
- g_io_add_watch(data->channel,
+ data->watch_id = g_io_add_watch(data->channel,
G_IO_IN | G_IO_NVAL | G_IO_HUP | G_IO_ERR,
icmpv6_event, data);