[Fix] When connected SOftAP goes out of range, AP sate was stuck at Association. 91/184191/1
authorNishant Chaprana <n.chaprana@samsung.com>
Mon, 16 Jul 2018 07:23:15 +0000 (12:53 +0530)
committerNishant Chaprana <n.chaprana@samsung.com>
Mon, 16 Jul 2018 07:23:15 +0000 (12:53 +0530)
This patch fixes the scenario when connected SoftAp goes out of range.
In this case, the profile_info is NULL, due to which state changed callback
was not notified to application.

Below are the test application logs for above mentioned scenario:-

sh-3.2# /usr/bin/wifi_manager_test
Test Thread created...
1
Event received from stdin
Wifi init succeeded
Operation succeeded!
9
Event received from stdin
Scan request succeeded
Operation succeeded!
Scan changed, scan state : 1
Scan changed, scan state : 0
Scan Completed from scan request, error code : NONE
9
Event received from stdin
Scan request succeeded
Operation succeeded!
Scan changed, scan state : 1
Scan changed, scan state : 0
Scan Completed from scan request, error code : NONE
[1] Connection state changed callback, state : Association, AP name : Nishant
[2] Connection state changed callback, state : Association, AP name : Nishant
[1] Connection state changed callback, state : Configuration, AP name : Nishant
[2] Connection state changed callback, state : Configuration, AP name : Nishant
[1] Connection state changed callback, state : Connected, AP name : Nishant
[2] Connection state changed callback, state : Connected, AP name : Nishant
[1] RSSI level changed callback, level = 4
[2] RSSI level changed callback, level = 4
[1] Connection state changed callback, state : Configuration, AP name : Nishant
[2] Connection state changed callback, state : Configuration, AP name : Nishant
[1] Connection state changed callback, state : Disconnected, AP name : Nishant
[2] Connection state changed callback, state : Disconnected, AP name : Nishant
[1] Connection state changed callback, state : Association, AP name : Nishant
[2] Connection state changed callback, state : Association, AP name : Nishant
[1] Connection state changed callback, state : Unknown, AP name : Nishant
[2] Connection state changed callback, state : Unknown, AP name : Nishant
[1] Connection state changed callback, state : Disconnected, AP name : Nishant
[2] Connection state changed callback, state : Disconnected, AP name : Nishant
[1] Connection state changed callback, state : Association, AP name : Nishant
[2] Connection state changed callback, state : Association, AP name : Nishant
Scan changed, scan state : 1
Scan changed, scan state : 0
[1] Background Scan Completed, error code : NONE
[2] Background Scan Completed, error code : NONE
Scan changed, scan state : 1
Scan changed, scan state : 0
[1] Background Scan Completed, error code : NONE
[2] Background Scan Completed, error code : NONE
Scan changed, scan state : 1
Scan changed, scan state : 0
[1] Background Scan Completed, error code : NONE
[2] Background Scan Completed, error code : NONE
Scan changed, scan state : 1
Scan changed, scan state : 0
[1] Background Scan Completed, error code : NONE
[2] Background Scan Completed, error code : NONE
[1] Connection state changed callback, state : Unknown, AP name : Nishant
[2] Connection state changed callback, state : Unknown, AP name : Nishant
[1] Connection state changed callback, state : Disconnected, AP name : Nishant
[2] Connection state changed callback, state : Disconnected, AP name : Nishant
[1] Connection state changed callback, state : Association, AP name : Nishant
[2] Connection state changed callback, state : Association, AP name : Nishant
Scan changed, scan state : 1
Scan changed, scan state : 0
[1] Background Scan Completed, error code : NONE
[2] Background Scan Completed, error code : NONE

Change-Id: I7143a5ea790fd967ac17f41cbcf3c265ec6d6e16
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
packaging/capi-network-wifi-manager.spec
src/wifi_internal.c

index d802ad2b995b7119b88f5e6e216d49c22a17169d..c1150575b2d99fddbe21f2c0c7595ee4dbc4d32e 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          capi-network-wifi-manager
 Summary:       Network Wi-Fi library in TIZEN C API
-Version:       1.0.38
+Version:       1.0.39
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index 72bf7a9a5c947d5b9c5a7ce8abbd2c1a77ade4e6..4720e1676d1be48555ec8bcedb9fd1930d61ffff 100755 (executable)
@@ -573,7 +573,7 @@ static void __state_changed_cb(char *profile_name,
        GSList *list;
        net_profile_info_s *ap_info = NULL;
 
-       if (profile_name == NULL || profile_info == NULL)
+       if (profile_name == NULL)
                return;
 
        WIFI_LOG(WIFI_INFO, "%s state changed : %s", profile_name, __convert_ap_state_to_string(state));