diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-06-12 01:13:21 +0200 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-06-12 01:13:21 +0200 |
commit | d1a845b0fa62067f10bb328433c23d52426f4a7d (patch) | |
tree | ae06cd182ec7681f6bf5f2831dfdea30a0c27a58 /plugins | |
parent | e4f5b9b550075490e06ec78a6fcab50a10356078 (diff) | |
download | connman-d1a845b0fa62067f10bb328433c23d52426f4a7d.tar.gz connman-d1a845b0fa62067f10bb328433c23d52426f4a7d.tar.bz2 connman-d1a845b0fa62067f10bb328433c23d52426f4a7d.zip |
Enable hidden blocks only when hidden SSIDs are around
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/supplicant.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/plugins/supplicant.c b/plugins/supplicant.c index 8fe3d638..f7e9a1b4 100644 --- a/plugins/supplicant.c +++ b/plugins/supplicant.c @@ -191,6 +191,7 @@ struct supplicant_task { struct connman_network *pending_network; char *path; char *netpath; + gboolean hidden_found; GHashTable *hidden_blocks; gboolean created; enum supplicant_state state; @@ -1835,6 +1836,9 @@ static void properties_reply(DBusPendingCall *call, void *user_data) } } + if (result.ssid == NULL) + task->hidden_found = TRUE; + if (result.frequency > 0 && result.frequency < 14) result.frequency = 2407 + (5 * result.frequency); else if (result.frequency == 14) @@ -1936,10 +1940,10 @@ static void get_properties(struct supplicant_task *task) char *path; path = g_slist_nth_data(task->scan_results, 0); - if (path == NULL) { + if (path == NULL && task->hidden_found == TRUE) { /* * We're done with regular scanning, let's enable the missing - * network blocks. + * network blocks if there are hidden SSIDs around. */ hidden_block_enable(task); goto noscan; @@ -2026,6 +2030,8 @@ static void scan_results_reply(DBusPendingCall *call, void *user_data) task->scan_results = g_slist_append(task->scan_results, path); } + task->hidden_found = FALSE; + g_strfreev(results); dbus_message_unref(reply); |