mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
bluez5: unregister HSP dbus object paths when current HSP/HFP registration fails
This commit is contained in:
parent
c778bd734c
commit
b66e67db14
1 changed files with 8 additions and 2 deletions
|
|
@ -1054,7 +1054,7 @@ struct spa_bt_backend *backend_native_new(struct spa_bt_monitor *monitor,
|
||||||
if (!dbus_connection_register_object_path(backend->conn,
|
if (!dbus_connection_register_object_path(backend->conn,
|
||||||
PROFILE_HSP_HS,
|
PROFILE_HSP_HS,
|
||||||
&vtable_profile, backend)) {
|
&vtable_profile, backend)) {
|
||||||
goto fail;
|
goto fail1;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -1062,11 +1062,17 @@ struct spa_bt_backend *backend_native_new(struct spa_bt_monitor *monitor,
|
||||||
if (!dbus_connection_register_object_path(backend->conn,
|
if (!dbus_connection_register_object_path(backend->conn,
|
||||||
PROFILE_HFP_AG,
|
PROFILE_HFP_AG,
|
||||||
&vtable_profile, backend)) {
|
&vtable_profile, backend)) {
|
||||||
goto fail;
|
goto fail2;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return backend;
|
return backend;
|
||||||
|
fail2:
|
||||||
|
#ifdef HAVE_BLUEZ_5_BACKEND_HSP_NATIVE
|
||||||
|
dbus_connection_unregister_object_path(backend->conn, PROFILE_HSP_HS);
|
||||||
|
fail1:
|
||||||
|
dbus_connection_unregister_object_path(backend->conn, PROFILE_HSP_AG);
|
||||||
|
#endif
|
||||||
fail:
|
fail:
|
||||||
free(backend);
|
free(backend);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue