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 */