ecore_wl2: Don't treat EINVAL as a recoverable condition
authorDerek Foreman <derekf@osg.samsung.com>
Thu, 10 Mar 2016 19:56:24 +0000 (13:56 -0600)
committerChris Michael <cpmichael@osg.samsung.com>
Thu, 10 Mar 2016 20:55:04 +0000 (15:55 -0500)
EINVAL is bad, we can't go on.  If we treat it like it's not a fatal
error we'll end up spinning on the fd and constantly retrying sends
on the dead wayland connection.

@fix

src/lib/ecore_wl2/ecore_wl2_display.c

index 6df06ec..6569a43 100644 (file)
@@ -235,7 +235,7 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl)
    if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_READ))
      {
         ret = wl_display_dispatch(ewd->wl.display);
-        if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL)))
+        if ((ret < 0) && (errno != EAGAIN))
           {
              ERR("Received Fatal Error on Wayland Display");
 
@@ -252,7 +252,7 @@ _cb_connect_data(void *data, Ecore_Fd_Handler *hdl)
         if (ret == 0)
           ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ);
 
-        if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL)))
+        if ((ret < 0) && (errno != EAGAIN))
           {
              ERR("Received Fatal Error on Wayland Display");
 
@@ -303,7 +303,7 @@ _cb_connect_idle(void *data)
    return ECORE_CALLBACK_RENEW;
 
 err:
-   if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL)))
+   if ((ret < 0) && (errno != EAGAIN))
      {
         ERR("Wayland Socket Error: %s", strerror(errno));