diff options
author | Guillaume Friloux <guillaume.friloux@gmail.com> | 2015-01-30 14:25:53 +0100 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-02-11 17:03:39 +0100 |
commit | d0dabf8613f9a2a99c6e905af8a61d7814eba84c (patch) | |
tree | c1726f8389fdb06112bf4ba7129cea650f6d7749 | |
parent | 83917a8c6430e57279c01de801356c69565169a7 (diff) | |
download | efl-d0dabf8613f9a2a99c6e905af8a61d7814eba84c.tar.gz |
ecore: improve network events handling on Windows.
-rw-r--r-- | src/lib/ecore/ecore_main.c | 6 | ||||
-rw-r--r-- | 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 1ae5653426..f939518016 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 c5c0ec470c..ec240a2dba 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: |