mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
bluez5: always emit node object info for dynamic node
impl_add_listener() could be called more than one time, ensure that we always emit node info so that session manager(bluez-monitor) can receives it. Fixes #1308
This commit is contained in:
parent
62e98aa836
commit
4c9ac08310
1 changed files with 8 additions and 2 deletions
|
|
@ -506,8 +506,14 @@ static const struct spa_bt_transport_events dynamic_node_transport_events = {
|
||||||
static void emit_dynamic_node(struct dynamic_node *this, struct impl *impl,
|
static void emit_dynamic_node(struct dynamic_node *this, struct impl *impl,
|
||||||
struct spa_bt_transport *t, uint32_t id, const char *factory_name)
|
struct spa_bt_transport *t, uint32_t id, const char *factory_name)
|
||||||
{
|
{
|
||||||
if (this->transport != NULL)
|
spa_log_debug(impl->log, NAME": dynamic node, transport: %p->%p id: %08x->%08x",
|
||||||
return;
|
this->transport, t, this->id, id);
|
||||||
|
|
||||||
|
if (this->transport) {
|
||||||
|
/* Session manager don't really handles transport ptr changing. */
|
||||||
|
spa_assert(this->transport == t);
|
||||||
|
spa_hook_remove(&this->transport_listener);
|
||||||
|
}
|
||||||
|
|
||||||
this->impl = impl;
|
this->impl = impl;
|
||||||
this->transport = t;
|
this->transport = t;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue