mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-03 09:01:54 -05:00
proxy: invalidate proxy id when removed from map
Client-side bugs calling methods on destroyed proxies like
pw_proxy_ref(p);
pw_proxy_destroy(p);
...
wait for server to ack the remove
...
pw_core_destroy(p->core, p); /* p already removed & destroyed */
should not send messages with the stale proxy id to server.
Set id to SPA_ID_INVALID when removing a proxy from the id map, so that
such client bugs only result to ENOENT.
This commit is contained in:
parent
24e1603f81
commit
7f885a2e94
1 changed files with 3 additions and 0 deletions
|
|
@ -191,6 +191,9 @@ static inline void remove_from_map(struct pw_proxy *proxy)
|
|||
if (proxy->core)
|
||||
pw_map_remove(&proxy->core->objects, proxy->id);
|
||||
proxy->in_map = false;
|
||||
|
||||
/* Make sure any future method calls fail */
|
||||
proxy->id = SPA_ID_INVALID;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue