wayland/src
Marek Chalupa 8c061d1b7e client: check for error in wl_display_read_events
This prevents from blocking shown in one display test. Also, it
makes sense to not proceed further in the code of the function
when an error ocurred.

v2. set errno
    put note about the errno into wl_display_prepare_read doc
    check for error with mutex locked

v3.
    set errno to display->last_error

    check for the error only in wl_display_read_events. It's sufficient
    as prevention for the hanging and programmer doesn't need to
    check if wl_display_prepare_read (that was previously covered by
    this patch too) returned an error or the queue just was not empty.
    Without the check, it could result in indefinite looping.

Thanks to Pekka Paalanen <pekka.paalanen@collabora.co.uk> for
constant reviewing and discussing this patch.

Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
2014-08-22 15:33:49 +03:00
..
.gitignore Add a public header for the version number 2012-04-12 17:54:44 -04:00
connection.c connection: remove unreached code 2014-06-18 17:13:31 -07:00
event-loop.c event-loop: make signalfd non-blocking 2014-08-18 13:03:00 +03:00
scanner.c scanner: Make emit_structs more explicit 2014-08-18 11:31:48 +03:00
scanner.mk Rename source subdir from wayland to src 2011-08-12 16:25:14 -04:00
wayland-client-uninstalled.pc.in build: add uninstalled pkg-config files 2012-05-29 10:09:59 -04:00
wayland-client.c client: check for error in wl_display_read_events 2014-08-22 15:33:49 +03:00
wayland-client.h client: add a public function to make a roundtrip on a custom queue 2014-08-21 10:12:46 +03:00
wayland-client.pc.in Export the Wayland protocol XML file 2013-09-21 21:48:56 -07:00
wayland-egl.h wayland: Be consistent about #include-guard names 2013-10-21 14:39:06 -07:00
wayland-os.c os: wrap accept4(SOCK_CLOEXEC) 2012-04-25 09:37:42 +03:00
wayland-os.h os: wrap accept4(SOCK_CLOEXEC) 2012-04-25 09:37:42 +03:00
wayland-private.h Add support for server-side language bindings 2013-08-19 16:23:08 -07:00
wayland-scanner-uninstalled.pc.in build: Add wayland-scanner.pc. 2013-07-03 16:38:12 -04:00
wayland-scanner.pc.in build: Add wayland-scanner.pc. 2013-07-03 16:38:12 -04:00
wayland-server-uninstalled.pc.in build: add uninstalled pkg-config files 2012-05-29 10:09:59 -04:00
wayland-server.c server: Don't expose wl_display as a global 2014-08-21 13:51:07 +03:00
wayland-server.h server: Add a simple API to find a good default display 2014-08-05 15:43:00 -04:00
wayland-server.pc.in Export the Wayland protocol XML file 2013-09-21 21:48:56 -07:00
wayland-shm.c shm: Disallow shrinking shm pools 2014-04-07 16:01:25 -07:00
wayland-util.c Make default log handler print to stderr 2014-02-07 15:57:07 -08:00
wayland-util.h Add WL_PRINTF attribute and annotate wl_log_func_t 2014-04-03 14:18:45 -07:00
wayland-version.h.in Add a public header for the version number 2012-04-12 17:54:44 -04:00