Commit Graph

75 Commits

Author SHA1 Message Date
Felipe Magno de Almeida cdd597cb56 eio-model: Fixed concurrent access to filter_cb and monitoring empty directories
Added a spinlock, since contetion should be non-existant. And removed wrong if.
2015-04-10 17:23:12 -03:00
Felipe Magno de Almeida 22cfae5b8c 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.
2015-04-10 17:23:12 -03:00
Felipe Magno de Almeida d02f99ee21 eio-model: Fix Eio model races in tests
Removed sleep and implemented a deterministic way to test if the test has really finished.
2015-04-09 22:47:17 -03:00
Felipe Magno de Almeida 7928609a29 efl: move emodel to be an efl interfaces. 2015-04-05 16:23:38 +02:00
Larry Jr 2f53833331 emodel: api change property_get/set and event modelchange 2015-04-05 15:19:55 +02:00
Cedric BAIL 23cfd2b4f4 eio: fix coding style of Eio_Model. 2015-04-05 15:19:53 +02:00
Cedric BAIL 92be4f9c89 eio: use Eina_Log in Eio_Model. 2015-04-05 15:19:52 +02:00
Larry Jr 9ed6bea380 emodel: API changes and removed unnecessary eina_values copy and stringshares 2015-04-05 15:19:49 +02:00
Guilherme Lepsch 68a31df227 eio: fix mismatch datatypes for internal data model properties. 2015-04-05 15:19:47 +02:00
Larry Jr 05eecf5c8f emodel: Created Emodel and Eio_Model. 2015-04-05 15:19:45 +02:00
pierre lamot de767cabfa eio: don't restart a monitor on MacOSX when every paths have been removed.
This patch check that when a monitor is removed the FSEvent service, it is
not restarted if there is no more paths to monitor. This was generating an
error message from FSEvent.

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-17 10:42:51 +01:00
pierre lamot d958afd9fd eio: add OSX implementation of eio_monitor based on FSEvent
this patch adds an implementation of eio_monitor based on FSEvent
for OSX. This implentation has some limitations compared to inotify
implementation. Folowing events are not detected:
  - EIO_MONITOR_FILE_CLOSED
  - EIO_MONITOR_SELF_RENAME
  - EIO_MONITOR_SELF_DELETED

It should be noted that some events that happend before the call
to eio_monitor_add can be catched. This is why sleep timers have
been added in the test suite.

Tests have been added to check uncovered scenarios.

some things might still be improved:
  - self_deleted events for files might be handled by checking the
    file_name manually

  - self_deleted events for directories might be handled by setting
    kFSEventStreamCreateFlagWatchRoot. I've noticed by doing so that
	a lot more unwanted event are raised

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-03-12 07:43:59 +01: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
Cedric BAIL e6ff0a53ae eio: forcefully wait on shutdown for all thread to stop.
This should avoid potential crash during shutdown while some Eio thread
were still running. We are still not blocking for more than 30s, so if
an IO is blocked on a dead device, you should be fine.
2015-01-07 16:45:07 +01:00
Jean-Philippe Andre 8d9c6c0a00 inotify: Fix safety after read in 3 places
Fixes Coverity issues:
 - CID 1039565
 - CID 1039566
2014-10-28 10:54:51 +09:00
Adrien Nader 73d58b9446 eio: add doc for returns of eio_file_{mkdir,move,copy}, eio_dir_{move,copy}. 2014-10-20 18:28:19 +02:00
Philippe Caseiro a10d8585c9 eio: documentation for return values.
- eio_file_copy
 - eio_file_move
 - eio_dir_copy
 - eio_dir_move
 - eio_dir_unlink
2014-10-20 18:28:14 +02:00
Cedric BAIL 5e5e602ab0 eio: actually correctly set all field to NULL.
@fix T1729
2014-10-18 15:22:30 +02:00
Guillaume Friloux 73a23401ef Fix a bug with using Eio_File handler in main callback.
When using eio_file_stat_ls() (or any other exposing Eio_File *handler),
it will not be possible to use it from the main callback due to eio
freeing data too fast from the thread.

Moved frees from _eio_file_eina_ls_heavy() to eio_async_end() to be
sure that all the calls to main callback are over.
This implied adding the Eina_Iterator from eina_file_stat_ls to
the _Eio_File_Ls structure.
2014-10-09 15:53:01 -04:00
Daniel Juyung Seo 8ba2cc6fe9 doc: fixed typo. 2014-08-18 01:10:39 +09:00
Carsten Haitzler 257e853407 eio - fix possible stringhare del bug in dir chmod
coverity picked this up - CID 1039645. it does indeed look like a real
bug. if order->dirs is empty. for example.
2014-08-14 19:40:54 +09:00
Carsten Haitzler 8da87146b4 formatting fix 2014-08-14 19:39:46 +09: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
Jérémy Zurcher f8c2c57406 do not use EINA_FALSE instead of NULL 2014-05-07 17:45:11 +02:00
Mike Blumenkrantz d03ecb0f3d "whether" has 2x 'h' 2014-04-10 09:27:51 -04:00
Mike Blumenkrantz cc6eed2f86 eio monitors no longer trigger a CRI error during free
@fix
2014-03-21 14:21:04 -04:00
Cedric BAIL 41a9e2149e eio: let's not divide by 0.
fix CID 1193208.
2014-03-20 16:47:25 +09:00
Cedric BAIL 20d95413c3 eio: check if we need to wake up thread when the memory limit is changed. 2014-03-07 16:49:14 +09:00
Cedric BAIL 5915780274 eio: make it possible to limit the amount of memory used by threads.
Eio does need to allocate memory from the thread, transmit it to the
main loop where it is processed and later on freed. If the main loop
is to slow to handle the stream of incoming data, a huge peak of
memory can happen. Some people may want to limit the amount of memory
used at peak time and so this new infrastructure make that possible.

@feature
2014-03-05 14:06:39 +09:00
Cedric BAIL 042407a39d eio: remove warning. 2014-03-05 14:06:27 +09:00
Cedric BAIL be25ab6f85 eio: let's report the path we didn't found. 2014-03-05 11:46:12 +09:00
Cedric BAIL a31102ab43 eio: factorize code to have one place where data are pushed. 2014-03-05 10:41:37 +09:00
Cedric BAIL e1e4774306 eio: improve log when monitoring files. 2014-03-05 10:40:55 +09:00
Jean-Philippe Andre 8fdd3992f0 Eio monitor: Fix crash on invalid data access
Fix race condition when touching/changing a (theme) file often.
An Eio_Monitor was marked as "delete_me" but the rename callback
was still called, leading to memory access to already freed
objects.

Test protocol was:
ELM_THEME=~/default.edj elementary_test &
watch touch ~/default.edj
2014-01-14 14:23:05 +09:00
Carsten Haitzler 323f293ab5 eio - protect against posible segv on rename with eio
this MIGHT fix T45 but i can't reproduce to confirm, but reading a
backtrace indicates this could have been the issue. it looks like
there is room for a dangling pointer anyway, so fix.

stable release - cherry-pick me!
2014-01-07 17:49:29 +09:00
Jihoon Kim 946a797e0d fix warning related to argument in generating doxygen 2014-01-07 11:27:15 +09:00
Jihoon Kim 8fcedfc017 fix 'found unknown command' warning in generating doxygen 2014-01-06 14:01:15 +09:00
Daniel Juyung Seo 76d8532b54 efl: Unified eina critical manro to CRI.
Being annoyed by different types of eina critical macros - CRI, CRIT,
 CRITICAL -, I concluded to unify them to one. Discussed on IRC and
 finally, CRI was chosen to meet the consistency with other macros -
 ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
2013-12-26 12:27:13 +09:00
Carsten Haitzler b07c0a76ce alpha1 release autofoo/build tree work to pass distcheck and actually work 2013-11-04 18:33:35 +09:00
Stefan Schmidt d2f8eaf6c8 eio: Check return code of fcntl()
CID 1039686
2013-08-07 15:18:19 +01:00
Chris Michael 8270fc29f3 ecore_main_fd_handler_fd_get can return -1 so check fd validity before
calling read() with potentially -1.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 11:24:11 +01:00
Chris Michael 5444ee0681 ecore_main_fd_handler_fd_get Can return -1 so check fd validity before
calling close() on it.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-08-05 10:56:37 +01:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Jihoon Kim 3c2332f88f eio: fix Eio.h author information 2013-05-17 09:33:22 +09:00
ChunEon Park 959cb4e053 eio - fix header doc. 2013-05-16 22:34:42 +09:00
Cedric BAIL 2063e4353d efl: integrate eina_log_timing. 2013-03-27 21:43:45 +09:00
Cedric Bail a1c24625dd eio: fix a typos. 2013-03-24 23:06:43 +09:00