From ef770f9ccfe4884072ff2b3785490cc303575e17 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 4 Jun 2020 20:57:40 +0200 Subject: [PATCH] proxy: debug more errors --- src/pipewire/proxy.c | 4 ++-- src/pipewire/resource.c | 9 ++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/pipewire/proxy.c b/src/pipewire/proxy.c index 2c43aa5b7..d73797daa 100644 --- a/src/pipewire/proxy.c +++ b/src/pipewire/proxy.c @@ -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); if ((res = pw_proxy_install_marshal(proxy, false)) < 0) { - pw_log_error(NAME" %p: no marshal for type %s/%d", proxy, - type, version); + pw_log_error(NAME" %p: no marshal for type %s/%d: %s", proxy, + type, version, spa_strerror(res)); goto error_clean; } proxy->in_map = true; diff --git a/src/pipewire/resource.c b/src/pipewire/resource.c index f77aa05d0..5bc0a8d22 100644 --- a/src/pipewire/resource.c +++ b/src/pipewire/resource.c @@ -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) { - errno = -res; - pw_log_error(NAME" %p: can't add id %u for client %p: %m", - this, id, client); + pw_log_error(NAME" %p: can't add id %u for client %p: %s", + this, id, client, spa_strerror(res)); goto error_clean; } this->id = id; if ((res = pw_resource_install_marshal(this, false)) < 0) { - pw_log_error(NAME" %p: no marshal for type %s/%d", this, - type, version); + pw_log_error(NAME" %p: no marshal for type %s/%d: %s", this, + type, version, spa_strerror(res)); goto error_clean; }