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 /src | |
parent | 83917a8c6430e57279c01de801356c69565169a7 (diff) |
ecore: improve network events handling on Windows.
Diffstat (limited to 'src')
-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, | |||
2160 | if (readfds) | 2160 | if (readfds) |
2161 | { | 2161 | { |
2162 | if (FD_ISSET(fdh->fd, readfds)) | 2162 | if (FD_ISSET(fdh->fd, readfds)) |
2163 | network_event |= FD_READ; | 2163 | network_event |= FD_READ | FD_CONNECT | FD_ACCEPT; |
2164 | } | 2164 | } |
2165 | if (writefds) | 2165 | if (writefds) |
2166 | { | 2166 | { |
2167 | if (FD_ISSET(fdh->fd, writefds)) | 2167 | if (FD_ISSET(fdh->fd, writefds)) |
2168 | network_event |= FD_WRITE; | 2168 | network_event |= FD_WRITE | FD_CLOSE; |
2169 | } | 2169 | } |
2170 | if (exceptfds) | 2170 | if (exceptfds) |
2171 | { | 2171 | { |
@@ -2173,8 +2173,6 @@ _ecore_main_win32_select(int nfds EINA_UNUSED, | |||
2173 | network_event |= FD_OOB; | 2173 | network_event |= FD_OOB; |
2174 | } | 2174 | } |
2175 | 2175 | ||
2176 | network_event |= FD_CLOSE | FD_CONNECT | FD_ACCEPT; | ||
2177 | |||
2178 | if (network_event) | 2176 | if (network_event) |
2179 | { | 2177 | { |
2180 | event = WSACreateEvent(); | 2178 | 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, | |||
1610 | } | 1610 | } |
1611 | } | 1611 | } |
1612 | 1612 | ||
1613 | if (bind(svr->fd, net_info->info.ai_addr, net_info->info.ai_addrlen) < 0) | 1613 | if (bind(svr->fd, net_info->info.ai_addr, net_info->info.ai_addrlen) != 0) |
1614 | goto error; | 1614 | goto error; |
1615 | 1615 | ||
1616 | if (listen(svr->fd, 4096) < 0) goto error; | 1616 | if (listen(svr->fd, 4096) != 0) goto error; |
1617 | 1617 | ||
1618 | #ifdef HAVE_SYSTEMD | 1618 | #ifdef HAVE_SYSTEMD |
1619 | fd_ready: | 1619 | fd_ready: |