From 7e7f3e4286fdec002d8046316e924bb7b9eed4b0 Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 8 Jun 2020 09:18:50 -0700 Subject: [PATCH] avctp: Fix using L2CAP modes with bt_io bt_io modes are no longer compatible with L2CAP modes so the later shall not used with bt_io APIs. --- profiles/audio/avctp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/profiles/audio/avctp.c b/profiles/audio/avctp.c index 7307eaa9e..a58623216 100644 --- a/profiles/audio/avctp.c +++ b/profiles/audio/avctp.c @@ -1650,13 +1650,13 @@ int avctp_register(struct btd_adapter *adapter, gboolean master) server = g_new0(struct avctp_server, 1); - server->control_io = avctp_server_socket(src, master, L2CAP_MODE_BASIC, + server->control_io = avctp_server_socket(src, master, BT_IO_MODE_BASIC, AVCTP_CONTROL_PSM); if (!server->control_io) { g_free(server); return -1; } - server->browsing_io = avctp_server_socket(src, master, L2CAP_MODE_ERTM, + server->browsing_io = avctp_server_socket(src, master, BT_IO_MODE_ERTM, AVCTP_BROWSING_PSM); if (!server->browsing_io) { if (server->control_io) { @@ -2190,7 +2190,7 @@ int avctp_connect_browsing(struct avctp *session) device_get_address(session->device), BT_IO_OPT_SEC_LEVEL, BT_IO_SEC_MEDIUM, BT_IO_OPT_PSM, AVCTP_BROWSING_PSM, - BT_IO_OPT_MODE, L2CAP_MODE_ERTM, + BT_IO_OPT_MODE, BT_IO_MODE_ERTM, BT_IO_OPT_INVALID); if (err) { error("%s", err->message); -- 2.47.3