improve error messages

Send create_object error messages to the new resource id so that
the client can better know what proxy is failing.
Use resource_remove when create_object fails because the core will
already send a remove_id on failure.
Try to send other errors to the proxy that made the request if
possible.
This commit is contained in:
Wim Taymans 2020-02-25 16:38:13 +01:00
parent b96daabb2f
commit 65d72bb87c
9 changed files with 40 additions and 33 deletions

View file

@ -134,7 +134,8 @@ static void link_initialized(void *data)
return;
error_bind:
pw_resource_errorf(ld->factory_resource, res, "can't bind link: %s", spa_strerror(res));
pw_resource_errorf_id(ld->factory_resource, ld->new_id, res,
"can't bind link: %s", spa_strerror(res));
}
static const struct pw_impl_link_events link_events = {