proxy: debug more errors

This commit is contained in:
Wim Taymans 2020-06-04 20:57:40 +02:00
parent 1b4b8a9322
commit ef770f9ccf
2 changed files with 6 additions and 7 deletions

View file

@ -60,8 +60,8 @@ int pw_proxy_init(struct pw_proxy *proxy, const char *type, uint32_t version)
spa_hook_list_init(&proxy->object_listener_list); spa_hook_list_init(&proxy->object_listener_list);
if ((res = pw_proxy_install_marshal(proxy, false)) < 0) { if ((res = pw_proxy_install_marshal(proxy, false)) < 0) {
pw_log_error(NAME" %p: no marshal for type %s/%d", proxy, pw_log_error(NAME" %p: no marshal for type %s/%d: %s", proxy,
type, version); type, version, spa_strerror(res));
goto error_clean; goto error_clean;
} }
proxy->in_map = true; proxy->in_map = true;

View file

@ -72,16 +72,15 @@ struct pw_resource *pw_resource_new(struct pw_impl_client *client,
} }
if ((res = pw_map_insert_at(&client->objects, id, this)) < 0) { if ((res = pw_map_insert_at(&client->objects, id, this)) < 0) {
errno = -res; pw_log_error(NAME" %p: can't add id %u for client %p: %s",
pw_log_error(NAME" %p: can't add id %u for client %p: %m", this, id, client, spa_strerror(res));
this, id, client);
goto error_clean; goto error_clean;
} }
this->id = id; this->id = id;
if ((res = pw_resource_install_marshal(this, false)) < 0) { if ((res = pw_resource_install_marshal(this, false)) < 0) {
pw_log_error(NAME" %p: no marshal for type %s/%d", this, pw_log_error(NAME" %p: no marshal for type %s/%d: %s", this,
type, version); type, version, spa_strerror(res));
goto error_clean; goto error_clean;
} }