From 291fd9704f54dbf538240950136679a6841dbe95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= Date: Mon, 15 Jul 2024 13:27:30 +0200 Subject: [PATCH] bluez5: backend-native: Send error for not supported event only as AG The HS/HF roles should not sent error messages, only commands. --- spa/plugins/bluez5/backend-native.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spa/plugins/bluez5/backend-native.c b/spa/plugins/bluez5/backend-native.c index 2f48b6f60..1fe569b7c 100644 --- a/spa/plugins/bluez5/backend-native.c +++ b/spa/plugins/bluez5/backend-native.c @@ -1388,7 +1388,8 @@ static void rfcomm_process_events(struct rfcomm *rfcomm, char *buf, bool ag, boo if (!handler(rfcomm, token)) { spa_log_debug(backend->log, "RFCOMM received unsupported event: %s", token); - rfcomm_send_error(rfcomm, CMEE_OPERATION_NOT_SUPPORTED); + if (ag) + rfcomm_send_error(rfcomm, CMEE_OPERATION_NOT_SUPPORTED); } } }