felipealmeida pushed a commit to branch master.

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

commit 22cfae5b8c2af964a250f4ae9bc891777721d6da
Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br>
Date:   Fri Apr 10 17:11:41 2015 -0300

    eio_monitor: Removed unnecessary eio_file_direct_stat
    
    Removed unnecessary asynchronous stat, which could make eio_monitor to
    lose events between the monitor creation and stat completion.
---
 src/lib/eio/eio_monitor.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/lib/eio/eio_monitor.c b/src/lib/eio/eio_monitor.c
index d983bd1..9bbc96e 100644
--- a/src/lib/eio/eio_monitor.c
+++ b/src/lib/eio/eio_monitor.c
@@ -365,20 +365,12 @@ eio_monitor_stringshared_add(const char *path)
    monitor->fallback = EINA_FALSE;
    monitor->rename = EINA_FALSE;
    monitor->delete_me = EINA_FALSE;
+   monitor->exist = NULL;
 
    EINA_REFCOUNT_INIT(monitor);
-   EINA_REFCOUNT_REF(monitor); /* as we spawn a thread for this monitor, we 
need to refcount specifically for it */
-
-   monitor->exist = eio_file_direct_stat(monitor->path,
-                                         _eio_monitor_stat_cb,
-                                         _eio_monitor_error_cb,
-                                         monitor);
-   if (!monitor->exist)
-     {
-        _eio_monitor_free(monitor);
-        return NULL;
-     }
 
+   eio_monitor_backend_add(monitor);
+   
    eina_hash_direct_add(_eio_monitors, path, monitor);
    INF("New monitor on '%s'.", path);
 

-- 


Reply via email to