devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=59d1491929773974366c7bdbfd53c649f6e164f8

commit 59d1491929773974366c7bdbfd53c649f6e164f8
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Thu Oct 22 13:11:02 2015 -0400

    ecore-wl2: Fix event processing for client connections
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/ecore_wl2_display.c | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/src/lib/ecore_wl2/ecore_wl2_display.c 
b/src/lib/ecore_wl2/ecore_wl2_display.c
index 9d90e1f..395595d 100644
--- a/src/lib/ecore_wl2/ecore_wl2_display.c
+++ b/src/lib/ecore_wl2/ecore_wl2_display.c
@@ -193,18 +193,26 @@ _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);
-   else if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_WRITE))
+     {
+        ret = wl_display_dispatch(ewd->wl.display);
+        if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL)))
+          {
+             /* TODO: handle error case */
+             return ECORE_CALLBACK_CANCEL;
+          }
+     }
+
+   if (ecore_main_fd_handler_active_get(hdl, ECORE_FD_WRITE))
      {
         ret = wl_display_flush(ewd->wl.display);
         if (ret == 0)
           ecore_main_fd_handler_active_set(hdl, ECORE_FD_READ);
-     }
 
-   if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL)))
-     {
-        /* TODO: handle error case */
-        return ECORE_CALLBACK_CANCEL;
+        if ((ret < 0) && ((errno != EAGAIN) && (errno != EINVAL)))
+          {
+             /* TODO: handle error case */
+             return ECORE_CALLBACK_CANCEL;
+          }
      }
 
    return ECORE_CALLBACK_RENEW;

-- 


Reply via email to