Apply tizen 3.0 based product patchsets
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / bt-rfcomm-client.c
index ec57e1e..099816e 100644 (file)
@@ -451,9 +451,8 @@ void _bt_rfcomm_client_disconnect_all(void)
                        close(conn_info->fd);
                        conn_info->disconnected = TRUE;
 
-                       _bt_disconnect_profile(conn_info->bt_addr, info->uuid,
-                                       NULL, NULL);
-
+                       _bt_disconnect_ext_profile(conn_info->bt_addr,
+                                                  info->obj_path);
                }
 
                client = client->next;
@@ -692,6 +691,7 @@ BT_EXPORT_API int bluetooth_rfcomm_connect(
                object_id = _bt_register_new_conn(path, new_connection);
                if (object_id < 0) {
                        __rfcomm_delete_id(id);
+                       g_free(path);
                        return BLUETOOTH_ERROR_INTERNAL;
                }
 
@@ -873,7 +873,7 @@ BT_EXPORT_API int bluetooth_rfcomm_disconnect(int socket_fd)
        conn_info->disconnected = TRUE;
 
        BT_INFO("conn_info %s", conn_info->bt_addr);
-       _bt_disconnect_profile(conn_info->bt_addr, info->uuid, NULL, NULL);
+       _bt_disconnect_ext_profile(conn_info->bt_addr, info->obj_path);
 
        if (info->idle_id == 0)
                info->idle_id = g_idle_add(__rfcomm_client_disconnect, info);