mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-16 07:00:00 -05:00
spa: bluez: telephony: reject double registration
This commit is contained in:
parent
9a0053a501
commit
78b6df769b
1 changed files with 6 additions and 0 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue