{
char file_path[BT_FILE_PATH_MAX] = { 0 };
bt_server_info_t *server_info;
+ bt_auth_info_t *new_auth_info;
BT_CHECK_PARAMETER(filename, return);
g_dbus_method_invocation_return_value(agent_info.auth_info->reply_context,
g_variant_new("(s)", &file_path));
- agent_info.auth_info->reply_context = NULL;
- agent_info.auth_info->file_path = g_strdup(file_path);
- g_free(agent_info.auth_info->filename);
- agent_info.auth_info->filename = g_strdup(filename);
+
+ new_auth_info = g_malloc0(sizeof(bt_auth_info_t));
+
+ new_auth_info->file_size = agent_info.auth_info->file_size;
+ new_auth_info->file_path = g_strdup(file_path);
+ new_auth_info->filename = g_strdup(filename);
+ new_auth_info->device_name = g_strdup(agent_info.auth_info->device_name);
+ new_auth_info->transfer_path = g_strdup(agent_info.auth_info->transfer_path);
+ new_auth_info->address = g_strdup(agent_info.auth_info->address);
+ memcpy(new_auth_info->contact_auth_info, agent_info.auth_info->contact_auth_info, 5);
+
+ __bt_free_auth_info(agent_info.auth_info);
+
+ agent_info.auth_info = new_auth_info;
return BLUETOOTH_ERROR_NONE;
}