Check whether mac address is empty or not 21/110121/2 accepted/tizen/common/20170210.170522 accepted/tizen/ivi/20170214.011036 accepted/tizen/mobile/20170214.010827 accepted/tizen/tv/20170214.010919 accepted/tizen/wearable/20170214.011004 submit/tizen/20170210.072732 submit/tizen/20170210.083740
authorhyunuktak <hyunuk.tak@samsung.com>
Fri, 13 Jan 2017 04:30:56 +0000 (13:30 +0900)
committertaesub kim <taesub.kim@samsung.com>
Tue, 7 Feb 2017 10:38:36 +0000 (02:38 -0800)
Change-Id: I98008f6654ce9eb2d54d7e96f4fdbe41a1a954e4
Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
src/wifi_manager.c

index 40ef736..201e70b 100755 (executable)
@@ -301,6 +301,14 @@ EXPORT_API int wifi_manager_get_mac_address(wifi_manager_h wifi, char **mac_addr
                                " from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
                        return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
                }
+
+               if (strlen(*mac_address) == 0) {
+                       WIFI_LOG(WIFI_ERROR, "Mac address is invalid" //LCOV_EXCL_LINE
+                               " from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
+                       g_free(*mac_address);
+                       *mac_address = NULL;
+                       return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
+               }
        }
 
        return WIFI_MANAGER_ERROR_NONE;