struct connman_element *element = list->data;
if (connman_element_match_static_property(element,
- "Name", &identifier) == TRUE)
+ "Name", &identifier) == TRUE)
return element;
}
struct connman_element *element = list->data;
if (connman_element_match_static_property(element,
- "Name", &identifier) == TRUE)
+ "Name", &identifier) == TRUE)
return element;
}
DBG("");
- if (data->cleanup_timer > 0) {
- g_source_remove(data->cleanup_timer);
- data->cleanup_timer = 0;
- }
-
__supplicant_scan(device);
data->inactive_timer = 0;
DBG("pending %d", g_slist_length(data->pending));
DBG("current %d", g_slist_length(data->current));
+ if (data->cleanup_timer > 0) {
+ g_source_remove(data->cleanup_timer);
+ cleanup_pending(data);
+ }
+
data->pending = data->current;
data->current = NULL;
- if (data->cleanup_timer > 0)
- return;
-
data->cleanup_timer = g_timeout_add_seconds(CLEANUP_TIMEOUT,
cleanup_pending, data);
}
if (data->cleanup_timer > 0) {
g_source_remove(data->cleanup_timer);
- data->cleanup_timer = 0;
+ cleanup_pending(data);
}
if (data->inactive_timer > 0) {
__supplicant_disconnect(element);
- for (list = data->pending; list; list = list->next) {
- struct connman_element *network = list->data;
-
- connman_element_unref(network);
- }
-
- g_slist_free(data->pending);
- data->pending = NULL;
-
for (list = data->current; list; list = list->next) {
struct connman_element *network = list->data;