From 6b6e9c4ea96e5ea171054fc0ac963488dbd986b5 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Fri, 21 Jun 2024 13:20:02 +0300 Subject: [PATCH] bluez5: make node.group valid JSON The node.group property is parsed as JSON, and as it here contains ":" it needs to be quoted accordingly. Fixes pw_strv_parse errors in logs. --- spa/plugins/bluez5/media-sink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spa/plugins/bluez5/media-sink.c b/spa/plugins/bluez5/media-sink.c index 3a178f476..1e822f776 100644 --- a/spa/plugins/bluez5/media-sink.c +++ b/spa/plugins/bluez5/media-sink.c @@ -1479,12 +1479,12 @@ static void emit_node_info(struct impl *this, bool full) char *node_group = NULL; if (this->transport && (this->transport->profile & SPA_BT_PROFILE_BAP_SINK)) { - spa_scnprintf(node_group_buf, sizeof(node_group_buf), "bluez-iso-%s-cig-%d", + spa_scnprintf(node_group_buf, sizeof(node_group_buf), "[\"bluez-iso-%s-cig-%d\"]", this->transport->device->adapter->address, this->transport->bap_cig); node_group = node_group_buf; } else if (this->transport && (this->transport->profile & SPA_BT_PROFILE_BAP_BROADCAST_SINK)) { - spa_scnprintf(node_group_buf, sizeof(node_group_buf), "bluez-iso-%s-big-%d", + spa_scnprintf(node_group_buf, sizeof(node_group_buf), "[\"bluez-iso-%s-big-%d\"]", this->transport->device->adapter->address, this->transport->bap_big); node_group = node_group_buf;