From e1d4c1224c0e1abce1d8cae49e241b37f1ca3eed Mon Sep 17 00:00:00 2001 From: deva Date: Fri, 15 Jan 2010 10:43:59 +0000 Subject: Add fix to entitylist, for mixing updates on dir rename/moves. Updated MacroList and TemplateList to macth new interface and use new insert method. --- server/src/inotify.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'server/src/inotify.cc') diff --git a/server/src/inotify.cc b/server/src/inotify.cc index dba3bfd..5fb983e 100644 --- a/server/src/inotify.cc +++ b/server/src/inotify.cc @@ -193,6 +193,11 @@ uint32_t INotify::Event::mask() return _mask; } +std::string INotify::Event::maskstr() +{ + return mask2asc(_mask); +} + INotify::INotify() { ifd = inotify_init1(O_NONBLOCK); @@ -370,6 +375,15 @@ INotify::Event INotify::getNextEvent() return e; } +void INotify::clear() +{ + if(ifd != -1) close(ifd); + ifd = inotify_init1(O_NONBLOCK); + if(ifd == -1) { + perror("Inotify init failed.\n"); + } +} + #ifdef TEST_INOTIFY //deps: debug.cc //cflags: -I.. -- cgit v1.2.3