From: DoHyun Pyun Date: Fri, 25 May 2018 00:52:35 +0000 (+0900) Subject: Correct the feature check logic X-Git-Tag: submit/tizen/20180525.015431^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=28bb4e2b1fd61d00b21afc40f1d9b29077363765;p=platform%2Fcore%2Fapi%2Fbluetooth.git Correct the feature check logic We should return "Not supported" error, if 2 features are false. Change-Id: If06338e129f1bc836bcb5dcccb4dd5cbe771ae75 --- diff --git a/include/bluetooth_private.h b/include/bluetooth_private.h index 518e5f5..9fa661b 100644 --- a/include/bluetooth_private.h +++ b/include/bluetooth_private.h @@ -604,15 +604,16 @@ do { \ do { \ bool is_supported = false; \ if (!system_info_get_platform_bool(feature_name1, &is_supported)) { \ - if (is_supported == false) { \ - LOGE("[%s] NOT_SUPPORTED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_SUPPORTED); \ - return BT_ERROR_NOT_SUPPORTED; \ + if (is_supported == true) {\ + break; \ } \ } else { \ LOGE("[%s] Fail to get the system feature: [%s]", __FUNCTION__, feature_name1); \ } \ if (!system_info_get_platform_bool(feature_name2, &is_supported)) { \ - if (is_supported == false) { \ + if (is_supported == true) { \ + break; \ + } else {\ LOGE("[%s] NOT_SUPPORTED(0x%08x)", __FUNCTION__, BT_ERROR_NOT_SUPPORTED); \ return BT_ERROR_NOT_SUPPORTED; \ } \