Use errno for result errors

Make new enumeration for data transport status and use errno
style error numbers for errors.
This commit is contained in:
Wim Taymans 2017-11-13 09:41:41 +01:00
parent dda28b1589
commit 6fb0f580ea
86 changed files with 2019 additions and 1988 deletions

View file

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