Remove and modify for some dbus policies
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-adapter.c
index f26b7e8..7729084 100644 (file)
@@ -89,7 +89,7 @@ BT_EXPORT_API int bluetooth_enable_adapter(void)
                                BLUETOOTH_ERROR_DEVICE_ALREADY_ENABLED);
 
 #ifdef TIZEN_FEATURE_BT_DPM
-       retv_if(bluetooth_dpm_is_mode_allowed() == BLUETOOTH_DPM_RESULT_ACCESS_DENIED,
+       retv_if(bluetooth_dpm_is_mode_allowed() == BLUETOOTH_ERROR_PERMISSION_DEINED,
                                BLUETOOTH_ERROR_PERMISSION_DEINED);
 #endif
 
@@ -364,6 +364,10 @@ BT_EXPORT_API int bluetooth_start_discovery(unsigned short max_response,
        BT_INIT_PARAMS();
        BT_ALLOC_PARAMS(in_param1, in_param2, in_param3, in_param4, out_param);
 
+       g_array_append_vals(in_param1, &max_response, sizeof(unsigned short));
+       g_array_append_vals(in_param2, &discovery_duration, sizeof(unsigned short));
+       g_array_append_vals(in_param3, &classOfDeviceMask, sizeof(unsigned int));
+
        result = _bt_send_request(BT_BLUEZ_SERVICE, BT_START_DISCOVERY,
                in_param1, in_param2, in_param3, in_param4, &out_param);