summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2022-04-22 20:52:41 +0900
committerJaehyun Kim <jeik01.kim@samsung.com>2022-04-22 20:55:25 +0900
commit4e842a9ceb1ed629777f30343fc98c415fc289d9 (patch)
treeebf07ec90e9b8f778a89f14b5c6f1fd6b8c8d911
parent3b0014134b2153de07f0c0b953a243a07d9029a9 (diff)
downloadconnman-4e842a9ceb1ed629777f30343fc98c415fc289d9.tar.gz
connman-4e842a9ceb1ed629777f30343fc98c415fc289d9.tar.bz2
connman-4e842a9ceb1ed629777f30343fc98c415fc289d9.zip
Check current_network before comparing connected BSSIDssubmit/tizen_6.5/20220502.074237accepted/tizen/6.5/unified/20220505.134809
Change-Id: I5b9b1d59eb63f80d7d36b3201d0aa9cd79119309 Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
-rwxr-xr-xgsupplicant/supplicant.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gsupplicant/supplicant.c b/gsupplicant/supplicant.c
index 906f0ea7..5f118351 100755
--- a/gsupplicant/supplicant.c
+++ b/gsupplicant/supplicant.c
@@ -3415,6 +3415,18 @@ static void update_network_signal(GSupplicantNetwork *network)
}
#if defined TIZEN_EXT
+static gboolean check_network_validity(gpointer key, gpointer value,
+ gpointer user_data)
+{
+ GSupplicantNetwork *network = value;
+ GSupplicantNetwork *current_network = user_data;
+
+ if (network == current_network)
+ return TRUE;
+
+ return FALSE;
+}
+
static gboolean last_connected_timeout(gpointer data)
{
GSupplicantInterface *interface = data;
@@ -3422,6 +3434,10 @@ static gboolean last_connected_timeout(gpointer data)
SUPPLICANT_DBG("Timeout last connected bss");
+ if (interface->state != G_SUPPLICANT_STATE_COMPLETED ||
+ !g_hash_table_find(interface->bss_mapping, check_network_validity, current_network))
+ goto done;
+
if (current_network && current_network->best_bss) {
if (compare_bssid(current_network->best_bss->bssid, interface->connected_bssid)) {
g_supplicant_network_set_last_connected_bssid(current_network, interface->connected_bssid);
@@ -3429,6 +3445,7 @@ static gboolean last_connected_timeout(gpointer data)
}
}
+done:
last_connected_bss_timeout = 0;
return FALSE;
}