cedric pushed a commit to branch master.

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

commit d0dabf8613f9a2a99c6e905af8a61d7814eba84c
Author: Guillaume Friloux <guillaume.fril...@gmail.com>
Date:   Fri Jan 30 14:25:53 2015 +0100

    ecore: improve network events handling on Windows.
---
 src/lib/ecore/ecore_main.c    | 6 ++----
 src/lib/ecore_con/ecore_con.c | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 1ae5653..f939518 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2160,12 +2160,12 @@ _ecore_main_win32_select(int             nfds 
EINA_UNUSED,
         if (readfds)
           {
              if (FD_ISSET(fdh->fd, readfds))
-               network_event |= FD_READ;
+               network_event |= FD_READ | FD_CONNECT | FD_ACCEPT;
           }
         if (writefds)
           {
              if (FD_ISSET(fdh->fd, writefds))
-               network_event |= FD_WRITE;
+               network_event |= FD_WRITE | FD_CLOSE;
           }
         if (exceptfds)
           {
@@ -2173,8 +2173,6 @@ _ecore_main_win32_select(int             nfds EINA_UNUSED,
                network_event |= FD_OOB;
           }
 
-        network_event |= FD_CLOSE | FD_CONNECT | FD_ACCEPT;
-
         if (network_event)
           {
              event = WSACreateEvent();
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index c5c0ec4..ec240a2 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -1610,10 +1610,10 @@ _ecore_con_cb_tcp_listen(void *data,
           }
      }
 
-   if (bind(svr->fd, net_info->info.ai_addr, net_info->info.ai_addrlen) < 0)
+   if (bind(svr->fd, net_info->info.ai_addr, net_info->info.ai_addrlen) != 0)
      goto error;
 
-   if (listen(svr->fd, 4096) < 0) goto error;
+   if (listen(svr->fd, 4096) != 0) goto error;
 
 #ifdef HAVE_SYSTEMD
 fd_ready:

-- 


Reply via email to