ecore: properly track events in Efl.Loop.Fd object.
authorCedric Bail <cedric@osg.samsung.com>
Fri, 5 Aug 2016 19:14:18 +0000 (12:14 -0700)
committerCedric Bail <cedric@osg.samsung.com>
Fri, 5 Aug 2016 19:14:18 +0000 (12:14 -0700)
Thanks Gustavo.

src/lib/ecore/efl_loop_fd.c

index fdd59b1..5df3ec4 100644 (file)
@@ -130,17 +130,17 @@ _check_fd_event_catcher_del(void *data, const Eo_Event *event)
      {
         if (array[i].desc == EFL_LOOP_FD_EVENT_READ)
           {
-             if (fd->references.read++ > 0) continue;
+             if (fd->references.read-- > 0) 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-- > 0) 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-- > 0) continue;
              _efl_loop_fd_reset(event->object, fd);
           }
      }