From fb7e0ea5b5879be9784d75ba69c05652a2ab47a9 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Mon, 10 Sep 2012 01:52:39 +0000 Subject: [PATCH] eio: Fix monitor shutdown when main loop did never run. SVN revision: 76365 --- legacy/eio/ChangeLog | 4 ++++ legacy/eio/NEWS | 14 ++++++++++++++ legacy/eio/src/lib/eio_monitor.c | 15 ++++++++++++++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/legacy/eio/ChangeLog b/legacy/eio/ChangeLog index 0dc04a1cbc..d576945865 100644 --- a/legacy/eio/ChangeLog +++ b/legacy/eio/ChangeLog @@ -39,3 +39,7 @@ 2012-09-06 Vincent Torri * Improve file monitoring on Windows to mimic more inotify behavior. + +2012-09-10 Cedric Bail + + * Fix monitor shutdown when mainloop did never run. diff --git a/legacy/eio/NEWS b/legacy/eio/NEWS index aedcbee570..8a42fa7b9f 100644 --- a/legacy/eio/NEWS +++ b/legacy/eio/NEWS @@ -1,3 +1,17 @@ +Eio 1.8.0 + +Changes since Eio 1.7.0: +------------------------- + +Additions: + +Fixes: + - fix monitor shutdown when mainloop did never run. + +Improvements: + +Removal: + Eio 1.7.0 Changes since Eio 1.0.0: diff --git a/legacy/eio/src/lib/eio_monitor.c b/legacy/eio/src/lib/eio_monitor.c index c21b1f49ca..9f735d63c6 100644 --- a/legacy/eio/src/lib/eio_monitor.c +++ b/legacy/eio/src/lib/eio_monitor.c @@ -158,7 +158,20 @@ eio_monitor_init(void) void eio_monitor_shutdown(void) { - /* FIXME: Need to cancel all request... */ + Eina_Iterator *it; + Eio_Monitor *monitor; + + it = eina_hash_iterator_data_new(_eio_monitors); + EINA_ITERATOR_FOREACH(it, monitor) + { + if (monitor->exist) + { + eio_file_cancel(monitor->exist); + monitor->exist = NULL; + } + monitor->delete_me = EINA_TRUE; + } + eina_iterator_free(it); eina_hash_free(_eio_monitors); eio_monitor_backend_shutdown();