From 4d5105afebc2747fbf7da24cfaf93b933b18f086 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 19 Dec 2016 21:43:56 -0200 Subject: [PATCH] efl_io_buffered_stream: if there is a copier, check if it's done. Before we're exiting if there was nothing pending, but in some cases this was too aggressive as the copier's source may be alive (ie: not-EOS), however nothing was read to its internal buffer, thus no pending. Since the copier will track its source's EOS, just check if it's done. --- src/lib/ecore/efl_io_buffered_stream.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ecore/efl_io_buffered_stream.c b/src/lib/ecore/efl_io_buffered_stream.c index 3b7b4d267b..ce6411bc5d 100644 --- a/src/lib/ecore/efl_io_buffered_stream.c +++ b/src/lib/ecore/efl_io_buffered_stream.c @@ -104,7 +104,7 @@ _efl_io_buffered_stream_sender_done(void *data, const Efl_Event *event EINA_UNUS efl_ref(o); efl_event_callback_call(o, EFL_IO_BUFFERED_STREAM_EVENT_PROGRESS, NULL); efl_event_callback_call(o, EFL_IO_BUFFERED_STREAM_EVENT_WRITE_FINISHED, NULL); - if ((pending == 0) || efl_io_copier_done_get(pd->receiver)) + if ((!pd->receiver) || efl_io_copier_done_get(pd->receiver)) { if (!pd->is_finished) { @@ -294,7 +294,7 @@ _efl_io_buffered_stream_efl_io_reader_eos_set(Eo *o, Efl_Io_Buffered_Stream_Data efl_event_callback_call(o, EFL_IO_BUFFERED_STREAM_EVENT_PROGRESS, NULL); efl_event_callback_call(o, EFL_IO_READER_EVENT_EOS, NULL); efl_event_callback_call(o, EFL_IO_BUFFERED_STREAM_EVENT_READ_FINISHED, NULL); - if ((pending == 0) || efl_io_copier_done_get(pd->sender)) + if ((!pd->sender) || efl_io_copier_done_get(pd->sender)) { if (!pd->is_finished) {