Fix the internal UTC fail issue 45/88945/1
authorHyuk Lee <hyuk0512.lee@samsung.com>
Wed, 21 Sep 2016 07:17:24 +0000 (16:17 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Wed, 21 Sep 2016 07:17:24 +0000 (16:17 +0900)
Change-Id: I58c4cfb439e12d975a0d83c40dc65a14bd8ca95d
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
src/bluetooth-adapter.c

index 2be934c..94a2df4 100644 (file)
@@ -3302,14 +3302,14 @@ int bt_adapter_le_create_scan_filter(bt_scan_filter_h *scan_filter)
        bt_le_scan_filter_s *__filter = NULL;
 
        BT_CHECK_LE_SUPPORT();
+       BT_CHECK_INIT_STATUS();
+       BT_CHECK_INPUT_PARAMETER(scan_filter);
+
        if (bluetooth_is_scan_filter_supported() == FALSE) {
                BT_ERR("BT_ERROR_NOT_SUPPORTED(0x%08x)", BT_ERROR_NOT_SUPPORTED);
                return BT_ERROR_NOT_SUPPORTED;
        }
 
-       BT_CHECK_INIT_STATUS();
-       BT_CHECK_INPUT_PARAMETER(scan_filter);
-
        __filter = (bt_le_scan_filter_s *)g_malloc0(sizeof(bt_le_scan_filter_s));
        if (__filter == NULL) {
                BT_ERR("OUT_OF_MEMORY(0x%08x)",
@@ -3666,12 +3666,13 @@ int bt_adapter_le_unregister_all_scan_filters(void)
        int error_code = BT_ERROR_NONE;
 
        BT_CHECK_LE_SUPPORT();
+       BT_CHECK_INIT_STATUS();
+
        if (bluetooth_is_scan_filter_supported() == FALSE) {
                BT_ERR("BT_ERROR_NOT_SUPPORTED(0x%08x)", BT_ERROR_NOT_SUPPORTED);
                return BT_ERROR_NOT_SUPPORTED;
        }
 
-       BT_CHECK_INIT_STATUS();
        if (bluetooth_is_le_scanning() == TRUE) {
                BT_ERR("NOW_IN_PROGRESS(0x%08x)",
                        BT_ERROR_NOW_IN_PROGRESS); /* LCOV_EXCL_LINE */