summaryrefslogtreecommitdiff
path: root/server/src/inotify.cc
diff options
context:
space:
mode:
authordeva <deva>2010-01-15 10:43:59 +0000
committerdeva <deva>2010-01-15 10:43:59 +0000
commite1d4c1224c0e1abce1d8cae49e241b37f1ca3eed (patch)
tree1e6c5fc292b58f640d20bdcd7106158dea5d9a3c /server/src/inotify.cc
parentc9e19f0f303db3d15f2dcb1185417a4200a29573 (diff)
Add fix to entitylist, for mixing updates on dir rename/moves. Updated MacroList and TemplateList to macth new interface and use new insert method.
Diffstat (limited to 'server/src/inotify.cc')
-rw-r--r--server/src/inotify.cc14
1 files changed, 14 insertions, 0 deletions
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..