summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehyun Kim <jeik01.kim@samsung.com>2019-06-11 12:55:14 (GMT)
committerJaehyun Kim <jeik01.kim@samsung.com>2019-06-11 12:55:57 (GMT)
commit85bcbd4afa2fee27400b4efc67000a1ea7a71973 (patch)
tree5df402279541fbc452e56ddf5bdca7979d7c267d
parent966f3e9da9a6e943333542b26778357b304c2f1b (diff)
downloadconnman-accepted/tizen_unified.zip
connman-accepted/tizen_unified.tar.gz
connman-accepted/tizen_unified.tar.bz2
Change-Id: I26b9d81fad917939750b42c893ea5e44824ba270 Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
-rw-r--r--plugins/wifi.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/wifi.c b/plugins/wifi.c
index 54380cc..9cc1d29 100644
--- a/plugins/wifi.c
+++ b/plugins/wifi.c
@@ -184,6 +184,7 @@ static gboolean wifi_first_scan = false;
static gboolean found_with_first_scan = false;
static gboolean is_wifi_notifier_registered = false;
static GHashTable *failed_bssids = NULL;
+static unsigned char buff_bssid[WIFI_BSSID_LEN_MAX] = { 0, };
#endif
@@ -3299,16 +3300,17 @@ static void ssid_init(GSupplicantSSID *ssid, struct connman_network *network)
bssids->bssid[3], bssids->bssid[4], bssids->bssid[5]);
buff[MAC_ADDRESS_LENGTH - 1] = '\0';
- gchar *curr_bssids = g_strdup((const gchar *)buff);
+ gchar *curr_bssid = g_strdup((const gchar *)buff);
- if (g_hash_table_contains(failed_bssids, curr_bssids)) {
+ if (g_hash_table_contains(failed_bssids, curr_bssid)) {
DBG("bssid match, try next bssid");
- g_free(curr_bssids);
+ g_free(curr_bssid);
continue;
} else {
- g_hash_table_add(failed_bssids, curr_bssids);
+ g_hash_table_add(failed_bssids, curr_bssid);
- ssid->bssid = &(bssids->bssid[0]);
+ memcpy(buff_bssid, bssids->bssid, WIFI_BSSID_LEN_MAX);
+ ssid->bssid = buff_bssid;
ssid->freq = (unsigned int)bssids->frequency;
break;
}