resource: pass the resource id in the error

This commit is contained in:
Wim Taymans 2018-10-03 19:24:53 +02:00
parent 4401e479c6
commit f46a83dcb7
15 changed files with 46 additions and 54 deletions

View file

@ -120,7 +120,7 @@ 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, -EINVAL,
pw_resource_error(resource, new_id, -EINVAL,
"needed properties: "
"spa.library.name=<library-name> "
"spa.factory.name=<factory-name>");
@ -129,7 +129,7 @@ static void *create_object(void *_data,
no_mem:
pw_log_error("can't create node");
if (resource) {
pw_resource_error(resource, -ENOMEM, "no memory");
pw_resource_error(resource, new_id, -ENOMEM, "no memory");
}
return NULL;
}