mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-02 09:01:50 -05:00
resource: improve error handling
Make some more varargs error functions Make pw_resource_error always just send the error to the resource id. Make sure we send errors to the right destination. Add proxy error event and emit it when the core finds an error for the given proxy id. The client error is supposed to be sent to all resources of a client for the given global.
This commit is contained in:
parent
cbdc024f4c
commit
8ae5424359
17 changed files with 107 additions and 64 deletions
|
|
@ -122,16 +122,16 @@ static void *create_object(void *_data,
|
|||
no_properties:
|
||||
pw_log_error("needed properties: spa.library.name=<library-name> spa.factory.name=<factory-name>");
|
||||
if (resource) {
|
||||
pw_resource_error(resource, new_id, -EINVAL,
|
||||
pw_resource_error(resource, -EINVAL,
|
||||
"needed properties: "
|
||||
"spa.library.name=<library-name> "
|
||||
"spa.factory.name=<factory-name>");
|
||||
}
|
||||
return NULL;
|
||||
no_mem:
|
||||
pw_log_error("can't create node");
|
||||
pw_log_error("can't create node: no memory");
|
||||
if (resource) {
|
||||
pw_resource_error(resource, new_id, -ENOMEM, "no memory");
|
||||
pw_resource_error(resource, -ENOMEM, "no memory");
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue