[TSAM-12289] Retrun error when MAC address is empty 34/107934/2 accepted/tizen_3.0.m2_mobile accepted/tizen_3.0.m2_tv accepted/tizen_3.0.m2_wearable tizen_3.0.m2 accepted/tizen/3.0.m2/mobile/20170104.121903 accepted/tizen/3.0.m2/tv/20170104.122400 accepted/tizen/3.0.m2/wearable/20170104.122743 accepted/tizen/3.0/common/20170102.143436 accepted/tizen/3.0/ivi/20170102.095720 accepted/tizen/3.0/mobile/20170102.095628 accepted/tizen/3.0/tv/20170102.095645 accepted/tizen/3.0/wearable/20170102.095705 submit/tizen_3.0.m2/20170104.093749 submit/tizen_3.0/20170102.045943
authorSeonah Moon <seonah1.moon@samsung.com>
Mon, 2 Jan 2017 02:21:06 +0000 (11:21 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Mon, 2 Jan 2017 04:42:44 +0000 (13:42 +0900)
Change-Id: If0740adab0d170b12cc7cfd630759b2df0ec9306
Signed-off-by: Seonah Moon <seonah1.moon@samsung.com>
packaging/capi-network-wifi-manager.spec
src/wifi_manager.c

index f2b633e3e26113a97bae918e7fba52b4366c2b0a..9364d403870a2c784de8894dced8c6c8e86a5a41 100755 (executable)
@@ -1,6 +1,6 @@
 Name:          capi-network-wifi-manager
 Summary:       Network Wi-Fi library in TIZEN C API
-Version:       1.0.12
+Version:       1.0.13
 Release:       1
 Group:         System/Network
 License:       Apache-2.0
index 9e23c756c4bbbf3e6b08c92e6a62477b1f12790c..8cc6bcbfa4bea83e91eddca27260d53f43f5d28d 100755 (executable)
@@ -296,9 +296,13 @@ EXPORT_API int wifi_manager_get_mac_address(wifi_manager_h wifi, char **mac_addr
 #else
        *mac_address = vconf_get_str(VCONFKEY_WIFI_BSSID_ADDRESS);
 
-       if (*mac_address == NULL) {
+       if (*mac_address == NULL || strlen(*mac_address) == 0) {
                WIFI_LOG(WIFI_ERROR, "Failed to get vconf" //LCOV_EXCL_LINE
                        " from %s", VCONFKEY_WIFI_BSSID_ADDRESS);
+               if (*mac_address) {
+                       free(*mac_address);
+                       *mac_address = NULL;
+               }
                return WIFI_MANAGER_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE
        }
 #endif