return IN_PROGRESS error when pbap connection is on progress
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / bt-service-obex-server.c
index 8ac19bd..4363a7e 100644 (file)
@@ -20,7 +20,7 @@
 #include <dlog.h>
 #include <string.h>
 #include <dirent.h>
-#ifdef TIZEN_FEATURE_BT_DPM
+#ifdef TIZEN_DPM_ENABLE
 #include "bt-service-dpm.h"
 #endif
 
@@ -535,9 +535,6 @@ static gboolean __bt_authorize_cb(GDBusMethodInvocation *context,
        GVariant *param = NULL;
        GError *err = NULL;
        bt_session_info_t *session_info = NULL;
-#ifdef TIZEN_FEATURE_BT_DPM
-       int value = DPM_BT_ERROR;
-#endif
 
        BT_DBG(" path [%s] \n", path);
 
@@ -576,9 +573,8 @@ static gboolean __bt_authorize_cb(GDBusMethodInvocation *context,
 
        agent_info.auth_info->transfer_path = g_strdup(path);
 
-#ifdef TIZEN_FEATURE_BT_DPM
-       _bt_dpm_get_allow_bluetooth_mode(&value);
-       if (value == DPM_BT_HANDSFREE_ONLY) {
+#ifdef TIZEN_DPM_ENABLE
+       if (_bt_dpm_get_allow_bluetooth_mode() == DPM_BT_HANDSFREE_ONLY) {
                /* Free auth info in next function */
                _bt_obex_server_reject_authorize();
                return FALSE;
@@ -815,9 +811,9 @@ void _bt_obex_transfer_completed(const char *transfer_path, gboolean success)
                        g_variant_builder_add(builder, "y", agent_info.auth_info->contact_auth_info[i]);
 
                param = g_variant_new("(isssstii(ay))", result,
-                                       transfer_info->device_name,
                                        transfer_info->filename,
                                        transfer_info->type,
+                                       transfer_info->device_name,
                                        transfer_info->address,
                                        transfer_info->file_size,
                                        transfer_info->transfer_id,