Fixed to call callback function for connection state changed without profile info 50/63250/1
authorhyunuktak <hyunuk.tak@samsung.com>
Wed, 23 Mar 2016 02:23:27 +0000 (11:23 +0900)
committerhyunuktak <hyunuk.tak@samsung.com>
Wed, 23 Mar 2016 02:23:29 +0000 (11:23 +0900)
Change-Id: I60fd969df13814033d965c7a9b3bf0462696d589
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
packaging/capi-network-wifi.spec
src/libnetwork.c

index cec25c2e4d1da9c2b59625facbf3b3e71cb1b16e..f8c4b8a866e92fcb93160a2cc5be5961f65fad5e 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          capi-network-wifi
 Summary:       Network Wi-Fi library in TIZEN C API
-Version:       1.0.68
+Version:       1.0.69
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index 28bd41077b1f20bee09b71fde56b0fd841ddba16..ebfb2b8fa4d2868dc5e9aec1bd1277a81fffdcdc 100755 (executable)
@@ -273,11 +273,6 @@ static gboolean __wifi_state_changed_cb(gpointer data)
        if (notify == NULL)
                return FALSE;
 
-       if (notify->ap_info == NULL) {
-               g_free(notify);
-               return FALSE;
-       }
-
        ap_info = (wifi_ap_h)notify->ap_info;
 
        _wifi_libnet_add_to_ap_list(ap_info);
@@ -312,18 +307,14 @@ static void __libnet_state_changed_cb(char *profile_name, net_profile_info_t *pr
        if (profile_name == NULL)
                return;
 
-       if (profile_info == NULL) {
-               SECURE_WIFI_LOG(WIFI_ERROR, "Failed to find: %s", profile_name);
-               return;
-       }
-
        ap_info = g_try_malloc0(sizeof(net_profile_info_t));
        if (ap_info == NULL) {
                WIFI_LOG(WIFI_ERROR, "Memory allocation error");
                return;
        }
 
-       memcpy(ap_info, profile_info, sizeof(net_profile_info_t));
+       if(profile_info)
+               memcpy(ap_info, profile_info, sizeof(net_profile_info_t));
 
        notify = g_try_new0(struct _wifi_state_notify, 1);
        if (notify == NULL) {