Commit Graph

14 Commits

Author SHA1 Message Date
Marcel Hollerbach 1eb24301fd efl_io_model: next try to fix this race condition
what is happening is that a file gets announced through eio_model
listing code, at this point of time, the monitor does not yet know about
the file. If the file now gets deleted between the annoncing and the
learning of the file from the monitor, then the file got an ADD event,
but no DEL event. Which is a bug.

With this commit there is a new API which asks the monitor if the file
already has the knowledge about the files existance, or not. A few
monitors like win32 inotify or cocoa do not have context about the file
directly, if the OS is now having the same bug, then we are again in
trouble, however, we canot do anything about that. In the case of kevent
or poll, this asks the context of the monitor if the file is already
there.

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10006
2019-09-19 14:50:42 -07:00
Vincent Torri a5267d3d9c remove Evil.h when not necessary, include evil_private.h when necessary
Test Plan: compilation

Reviewers: zmike, raster, cedric

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8925
2019-05-20 09:10:00 -04:00
Mike Blumenkrantz f41b9ea204 eio/fallback: mark all fallback monitors as fallbacks, not just for win32
@fix

Differential Revision: https://phab.enlightenment.org/D6443
2018-06-28 18:08:45 +02:00
Vincent Torri 771bb6e6a7 Evil: use static buffer to store error messages
Reviewers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D5394
2017-12-11 16:04:02 +09:00
Ivan Furs 3df48e281e eio: Correct deletion backend
Summary:

This patch fixes the bug Fileselector.
When backend is deleted need to remove event handler from the list.
This commit adds ecore_main_win32_handler_del for correct clean
handlers for cases when monitor backend was created by
eio_monitor_backend_add(Windows method) or eio_monitor_fallback_add. To
remove them needed to use eio_monitor_backend_del(Windows method) or
eio_monitor_fallback_del. To identify the method which should free
backend was added flag monitor->fallback instead of using static
_eio_monitor_win32_native. This solves conflicts if 2  monitors was
created and the second monitor changed the _eio_monitor_win32_native
variable value. When 1 monitor removed it will be deleted correctly .

@fix

Reviewers: NikaWhite

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4518
2016-12-27 16:20:59 +02:00
Ivan Furs 1c0b3668e1 Eio_monitor: support native monitor for Win32 (T4978)
Test Plan:
eio_monitor_backend_add()  and eio_monitor_fallback_add use different structures
**eio_monitor_backend_add()  **
struct _Eio_Monitor_Backend
{
   Eio_Monitor               *parent;
   Eio_Monitor_Win32_Watcher *watcher_file;
   Eio_Monitor_Win32_Watcher *watcher_dir;
   Eio_Monitor_Win32_Watcher *watcher_parent;
};

**eio_monitor_fallback_add()**
struct _Eio_Monitor_Backend
{
   Eio_Monitor *parent;

   Eina_Stat self;
   Eina_Hash *children;

   Ecore_Timer *timer;
   Ecore_Idler *idler;
   Ecore_Thread *work;

   int version;

   Eina_Bool delete_me : 1;
   Eina_Bool initialised : 1;
   Eina_Bool destroyed : 1;
};

therefore, an error occurs
**void eio_monitor_backend_del**(Eio_Monitor *monitor)
{

   if (!_eio_monitor_win32_native)          <------_eio_monitor_win32_native is EINA_TRUE
     {

        eio_monitor_fallback_del(monitor);  <------ignored------
        return;                             <------ignored------
     }

   _eio_monitor_win32_watcher_free(monitor->backend->watcher_parent);
   _eio_monitor_win32_watcher_free(monitor->backend->watcher_dir);
   _eio_monitor_win32_watcher_free(monitor->backend->watcher_file);
   free(monitor->backend);
   monitor->backend = NULL;
}

Reviewers: raster, vtorri, an.kroitor, jpeg, reutskiy.v.v, FurryMyad, cedric

Reviewed By: cedric

Subscribers: vtorri, artem.popov, cedric, jpeg

Tags: #windows, #efl

Differential Revision: https://phab.enlightenment.org/D4492

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-12-16 15:27:14 -08:00
Vivek Ellur d64f50acfc eio_monitor: fix memory leak in eio monitor module
Summary:
Free the allocated memory in eio monitor win32 module.

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3160

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-09 10:00:32 +02:00
michelle legrand 73823ac7b0 eio: fix segmentation fault on eio_monitor for win32 api
@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:58 +01:00
michelle legrand a9035c1cf5 eio: check that the file to be monitored is not an empty string.
This fix segmentation faults on Windows caused by eio_monitor events.

@fix
2015-02-11 17:03:37 +01:00
michelle legrand db55e76a4a eio: Win32 make GetOverlappedResult function non-blocking
@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-01-30 10:49:49 +01:00
Jean-Philippe Andre f4a0c8054f Win64: Fix a bunch of warnings
Fix invalid casts.
Use printf("%z") where appropriate.
Fix unused variables warnings.

Thanks vtorri for the patch.

@fix
2014-05-29 20:02:16 +09:00
Jean-Philippe Andre 0405d8e9a5 Win32: Fix invalid free in eio monitor
You can't just duplicate a string once and free it three times...
2014-05-21 18:03:53 +09:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Vincent Torri 81c86b19f6 merge: eio + fix compilation on windows + minor fixes + po files
don't move eio to IN-EFL right now


SVN revision: 80180
2012-12-04 17:40:58 +00:00