mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
proxy: reuse id when server removed it
When we destroy the proxy, just clear the id. We then remove the id completely when the server sends a remove_id request. This avoid reusing the proxy id before the server has finished with it.
This commit is contained in:
parent
d1e2f69324
commit
c208511f53
2 changed files with 2 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ void pw_proxy_destroy(struct pw_proxy *proxy)
|
||||||
pw_log_debug("proxy %p: destroy %u", proxy, proxy->id);
|
pw_log_debug("proxy %p: destroy %u", proxy, proxy->id);
|
||||||
spa_hook_list_call(&proxy->listener_list, struct pw_proxy_events, destroy);
|
spa_hook_list_call(&proxy->listener_list, struct pw_proxy_events, destroy);
|
||||||
|
|
||||||
pw_map_remove(&proxy->remote->objects, proxy->id);
|
pw_map_insert_at(&proxy->remote->objects, proxy->id, NULL);
|
||||||
spa_list_remove(&proxy->link);
|
spa_list_remove(&proxy->link);
|
||||||
|
|
||||||
free(impl);
|
free(impl);
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,7 @@ static void core_event_remove_id(void *data, uint32_t id)
|
||||||
pw_log_debug("remote %p: object remove %u", this, id);
|
pw_log_debug("remote %p: object remove %u", this, id);
|
||||||
pw_proxy_destroy(proxy);
|
pw_proxy_destroy(proxy);
|
||||||
}
|
}
|
||||||
|
pw_map_remove(&this->objects, id);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue