barbieri pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f1b94bdf7b40911a5d00894b8b79494bda5d808b

commit f1b94bdf7b40911a5d00894b8b79494bda5d808b
Author: Gustavo Sverzut Barbieri <barbi...@profusion.mobi>
Date:   Thu Nov 24 00:17:59 2016 -0200

    efl_loop_fd: fix comparison that was breaking callback deletion.
    
    Either we "--var" or we compare with "> 1" instead of "> 0", otherwise
    callback_del will keep the flags set.
---
 src/lib/ecore/efl_loop_fd.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore/efl_loop_fd.c b/src/lib/ecore/efl_loop_fd.c
index d1406e7..594eea4 100644
--- a/src/lib/ecore/efl_loop_fd.c
+++ b/src/lib/ecore/efl_loop_fd.c
@@ -130,17 +130,17 @@ _check_fd_event_catcher_del(void *data, const Efl_Event 
*event)
      {
         if (array[i].desc == EFL_LOOP_FD_EVENT_READ)
           {
-             if (fd->references.read-- > 0) continue;
+             if (fd->references.read-- > 1) continue;
              _efl_loop_fd_reset(event->object, fd);
           }
         else if (array[i].desc == EFL_LOOP_FD_EVENT_WRITE)
           {
-             if (fd->references.write-- > 0) continue;
+             if (fd->references.write-- > 1) continue;
              _efl_loop_fd_reset(event->object, fd);
           }
         if (array[i].desc == EFL_LOOP_FD_EVENT_ERROR)
           {
-             if (fd->references.error-- > 0) continue;
+             if (fd->references.error-- > 1) continue;
              _efl_loop_fd_reset(event->object, fd);
           }
      }

-- 


Reply via email to