diff options
| author | Manuel Stoeckl <code@mstoeckl.com> | 2019-07-13 17:54:14 -0400 |
|---|---|---|
| committer | Manuel Stoeckl <code@mstoeckl.com> | 2019-09-10 07:59:50 -0400 |
| commit | 8a831ac6ec359c0dff67d2f4221fcd48a3a9a4ce (patch) | |
| tree | 07425dce32005765167b45dc9a49d63ca7668c71 /src/wayland-client.c | |
| parent | client: Ignore new requests if display has a fatal error (diff) | |
| download | wayland-8a831ac6ec359c0dff67d2f4221fcd48a3a9a4ce.tar wayland-8a831ac6ec359c0dff67d2f4221fcd48a3a9a4ce.tar.gz wayland-8a831ac6ec359c0dff67d2f4221fcd48a3a9a4ce.tar.bz2 wayland-8a831ac6ec359c0dff67d2f4221fcd48a3a9a4ce.tar.lz wayland-8a831ac6ec359c0dff67d2f4221fcd48a3a9a4ce.tar.xz wayland-8a831ac6ec359c0dff67d2f4221fcd48a3a9a4ce.tar.zst wayland-8a831ac6ec359c0dff67d2f4221fcd48a3a9a4ce.zip | |
client: Don't abort when sending a request fails
Instead, set a fatal display error which will let an application
using libwayland-client shutdown cleanly.
Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Diffstat (limited to 'src/wayland-client.c')
| -rw-r--r-- | src/wayland-client.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/wayland-client.c b/src/wayland-client.c index 7c93c7b..5358500 100644 --- a/src/wayland-client.c +++ b/src/wayland-client.c @@ -745,14 +745,19 @@ wl_proxy_marshal_array_constructor_versioned(struct wl_proxy *proxy, } closure = wl_closure_marshal(&proxy->object, opcode, args, message); - if (closure == NULL) - wl_abort("Error marshalling request: %s\n", strerror(errno)); + if (closure == NULL) { + wl_log("Error marshalling request: %s\n", strerror(errno)); + display_fatal_error(proxy->display, errno); + goto err_unlock; + } if (debug_client) wl_closure_print(closure, &proxy->object, true); - if (wl_closure_send(closure, proxy->display->connection)) - wl_abort("Error sending request: %s\n", strerror(errno)); + if (wl_closure_send(closure, proxy->display->connection)) { + wl_log("Error sending request: %s\n", strerror(errno)); + display_fatal_error(proxy->display, errno); + } wl_closure_destroy(closure); |
