From 78b6df769bd9ad076bfb06372896a6b506ece5a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Mon, 3 Nov 2025 22:42:35 +0100 Subject: [PATCH] spa: bluez: telephony: reject double registration --- spa/plugins/bluez5/telephony.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spa/plugins/bluez5/telephony.c b/spa/plugins/bluez5/telephony.c index 679f0ac27..12e859a20 100644 --- a/spa/plugins/bluez5/telephony.c +++ b/spa/plugins/bluez5/telephony.c @@ -1153,6 +1153,9 @@ int telephony_ag_register(struct spa_bt_telephony_ag *ag) .message_function = ag_handler, }; + if (agimpl->path) + return -EBUSY; + spa_autofree char *path = spa_aprintf(PW_TELEPHONY_OBJECT_PATH "/ag%d", agimpl->this.id); /* register object */ @@ -1651,6 +1654,9 @@ int telephony_call_register(struct spa_bt_telephony_call *call) .message_function = call_handler, }; + if (callimpl->path) + return -EBUSY; + spa_autofree char *path = spa_aprintf("%s/call%d", agimpl->path, callimpl->this.id); /* register object */