blob: a0ad0991df2c4ce5af0e965630c0ae1a058addaf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
Schedule delayed scan when being disconnected from an AP
When being disconnected from an AP, a delayed scan is scheduled to make
sure the AP is still there. wpa_supplicant removes a BSS from its bss list
when it disappears from the scan results twice in a row.
Author: Samuel Ortiz <sameo@linux.intel.com>
Ported by Dongxiao Xu <dongxiao.xu@intel.com>
diff -ruN connman-0.56-orig/plugins/supplicant.c connman-0.56/plugins/supplicant.c
--- connman-0.56-orig/plugins/supplicant.c 2010-09-25 15:08:21.242927383 +0800
+++ connman-0.56/plugins/supplicant.c 2010-09-25 15:12:46.346136858 +0800
@@ -2184,6 +2184,15 @@
scanning == TRUE ? "started" : "finished");
}
+static gboolean delayed_scan(gpointer user_data)
+{
+ struct supplicant_task *task = user_data;
+
+ supplicant_scan(task->device);
+
+ return FALSE;
+}
+
static void state_change(struct supplicant_task *task, DBusMessage *msg)
{
DBusError error;
@@ -2277,7 +2286,13 @@
task_connect(task);
} else
task->network = NULL;
+ } else {
+ if (task->state == WPA_DISCONNECTED)
+ g_timeout_add_seconds(10, delayed_scan, task);
+
+ remove_network(task);
}
+
break;
default:
|