summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-12-19 21:59:57 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-12-20 10:18:33 -0200
commitc152aad8c5770b0ba260e398680ccdade96d3128 (patch)
treeb06d6cef5f9ee5d186c4bb2f95505a31837e7de0 /src
parent4d5105afebc2747fbf7da24cfaf93b933b18f086 (diff)
efl_io_reader/writer: silent errors when operating on unset-objects.
if we're operating on unset objects, fd are now -1 and would complain, relax that.
Diffstat (limited to '')
-rw-r--r--src/lib/ecore/efl_io_reader_fd.c4
-rw-r--r--src/lib/ecore/efl_io_writer_fd.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/ecore/efl_io_reader_fd.c b/src/lib/ecore/efl_io_reader_fd.c
index a1f9931086..e499009600 100644
--- a/src/lib/ecore/efl_io_reader_fd.c
+++ b/src/lib/ecore/efl_io_reader_fd.c
@@ -76,7 +76,7 @@ _efl_io_reader_fd_efl_io_reader_can_read_get(Eo *o EINA_UNUSED, Efl_Io_Reader_Fd
76EOLIAN static void 76EOLIAN static void
77_efl_io_reader_fd_efl_io_reader_can_read_set(Eo *o, Efl_Io_Reader_Fd_Data *pd, Eina_Bool can_read) 77_efl_io_reader_fd_efl_io_reader_can_read_set(Eo *o, Efl_Io_Reader_Fd_Data *pd, Eina_Bool can_read)
78{ 78{
79 EINA_SAFETY_ON_TRUE_RETURN(efl_io_reader_fd_get(o) < 0); 79 EINA_SAFETY_ON_TRUE_RETURN(efl_io_reader_fd_get(o) < 0 && can_read);
80 if (pd->can_read == can_read) return; 80 if (pd->can_read == can_read) return;
81 pd->can_read = can_read; 81 pd->can_read = can_read;
82 efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL); 82 efl_event_callback_call(o, EFL_IO_READER_EVENT_CAN_READ_CHANGED, NULL);
@@ -91,7 +91,7 @@ _efl_io_reader_fd_efl_io_reader_eos_get(Eo *o EINA_UNUSED, Efl_Io_Reader_Fd_Data
91EOLIAN static void 91EOLIAN static void
92_efl_io_reader_fd_efl_io_reader_eos_set(Eo *o, Efl_Io_Reader_Fd_Data *pd, Eina_Bool is_eos) 92_efl_io_reader_fd_efl_io_reader_eos_set(Eo *o, Efl_Io_Reader_Fd_Data *pd, Eina_Bool is_eos)
93{ 93{
94 EINA_SAFETY_ON_TRUE_RETURN(efl_io_reader_fd_get(o) < 0); 94 EINA_SAFETY_ON_TRUE_RETURN(efl_io_reader_fd_get(o) < 0 && !is_eos);
95 if (pd->eos == is_eos) return; 95 if (pd->eos == is_eos) return;
96 pd->eos = is_eos; 96 pd->eos = is_eos;
97 if (is_eos) 97 if (is_eos)
diff --git a/src/lib/ecore/efl_io_writer_fd.c b/src/lib/ecore/efl_io_writer_fd.c
index d337f7b191..6540d6564e 100644
--- a/src/lib/ecore/efl_io_writer_fd.c
+++ b/src/lib/ecore/efl_io_writer_fd.c
@@ -80,7 +80,7 @@ _efl_io_writer_fd_efl_io_writer_can_write_get(Eo *o EINA_UNUSED, Efl_Io_Writer_F
80EOLIAN static void 80EOLIAN static void
81_efl_io_writer_fd_efl_io_writer_can_write_set(Eo *o, Efl_Io_Writer_Fd_Data *pd, Eina_Bool can_write) 81_efl_io_writer_fd_efl_io_writer_can_write_set(Eo *o, Efl_Io_Writer_Fd_Data *pd, Eina_Bool can_write)
82{ 82{
83 EINA_SAFETY_ON_TRUE_RETURN(efl_io_writer_fd_get(o) < 0); 83 EINA_SAFETY_ON_TRUE_RETURN(efl_io_writer_fd_get(o) < 0 && can_write);
84 if (pd->can_write == can_write) return; 84 if (pd->can_write == can_write) return;
85 pd->can_write = can_write; 85 pd->can_write = can_write;
86 efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL); 86 efl_event_callback_call(o, EFL_IO_WRITER_EVENT_CAN_WRITE_CHANGED, NULL);