static void remove_lookup(struct proxy_lookup *lookup)
{
+ if (lookup->watch > 0)
+ g_source_remove(lookup->watch);
+
lookup_list = g_slist_remove(lookup_list, lookup);
connman_service_unref(lookup->service);
lookup->url = g_strdup(url);
lookup->service = connman_service_ref(service);
- lookup->watch = g_timeout_add_seconds(0, lookup_callback, lookup);
+ lookup->watch = g_idle_add(lookup_callback, lookup);
if (lookup->watch == 0) {
g_free(lookup->url);
g_free(lookup);
}
if (lookup) {
- if (lookup->watch > 0) {
- g_source_remove(lookup->watch);
- lookup->watch = 0;
- }
-
if (lookup->proxy &&
lookup->proxy->cancel_lookup)
lookup->proxy->cancel_lookup(lookup->service,