mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-06 13:30:01 -05:00
context: return -ENOENT for destroyed globals
Set the destroyed flag on globals and make sure they are not available anymore during the signal emissions. One such instance is where a global is destroyed, the resources are destroyed, a waiting client is resumed, the clients asks to bind to the global and causes an error. See #298
This commit is contained in:
parent
908dc6b10f
commit
7434986452
4 changed files with 12 additions and 10 deletions
|
|
@ -219,6 +219,9 @@ struct pw_global {
|
|||
void *object; /**< object associated with the interface */
|
||||
|
||||
struct spa_list resource_list; /**< The list of resources of this global */
|
||||
|
||||
unsigned int registered:1;
|
||||
unsigned int destroyed:1;
|
||||
};
|
||||
|
||||
#define pw_core_resource(r,m,v,...) pw_resource_call(r, struct pw_core_events, m, v, ##__VA_ARGS__)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue