From: Gustavo Sverzut Barbieri Date: Mon, 12 Sep 2016 16:21:20 +0000 (-0300) Subject: efl_net_dialer_tcp: emit EOS on errors. X-Git-Tag: upstream/1.20.0~4370 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bda935c304a3dee7ca4107a5579253a11635120e;p=platform%2Fupstream%2Fefl.git efl_net_dialer_tcp: emit EOS on errors. I/O copier and others may depend on end-of-stream to stop processing, then emit the EOS on failures. --- diff --git a/src/lib/ecore_con/efl_net_dialer_tcp.c b/src/lib/ecore_con/efl_net_dialer_tcp.c index a44be53..c5ce629 100644 --- a/src/lib/ecore_con/efl_net_dialer_tcp.c +++ b/src/lib/ecore_con/efl_net_dialer_tcp.c @@ -2,6 +2,7 @@ #define EFL_NET_DIALER_PROTECTED 1 #define EFL_NET_SOCKET_FD_PROTECTED 1 #define EFL_NET_SOCKET_PROTECTED 1 +#define EFL_IO_READER_PROTECTED 1 #ifdef HAVE_CONFIG_H # include @@ -104,6 +105,7 @@ _efl_net_dialer_tcp_connected(void *data, const struct sockaddr *addr EINA_UNUSE { freeaddrinfo(pd->resolve.names); pd->resolve.names = NULL; + efl_io_reader_eos_set(o, EINA_TRUE); if (err) efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); else @@ -170,6 +172,7 @@ _efl_net_dialer_tcp_resolved(void *data, const char *host EINA_UNUSED, const cha if (gai_error) { Eina_Error err = EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST; + efl_io_reader_eos_set(o, EINA_TRUE); efl_event_callback_call(o, EFL_NET_DIALER_EVENT_ERROR, &err); if (result) freeaddrinfo(result); return;