Changed files:
fam-dnotify.patch -> 1.5
+ FileWatch *hash_link;
+
+ FileWatch(void) {
+ FileWatch *hash_link;
+
+ FileWatch(void) {
+ n_dir_watches = 0;
+ }
+
+ n_dir_watches = 0;
+ }
+
+ Node *first;
+
+ FileWatchList(void) {
+ Node *first;
+
+ FileWatchList(void) {
+ }
+
+ void prepend(FileWatch *watch);
+ }
+
+ void prepend(FileWatch *watch);
+bool
+DNotify::DirWatch::FileWatchList::empty(void)
+{
+bool
+DNotify::DirWatch::FileWatchList::empty(void)
+{
+ Node *l, *prev;
+
+ l = first;
+ Node *l, *prev;
+
+ l = first;
+ while (l) {
+ if (l->watch == watch) {
+ if (prev)
+ while (l) {
+ if (l->watch == watch) {
+ if (prev)
+
+DNotify::DNotify(EventHandler h)
+{
+
+DNotify::DNotify(EventHandler h)
+{
-+ assert(ehandler == NULL);
++ assert(ehandler == 0);
+ Log::debug("closed pipe write end");
+ pipe_read_fd = -1;
+ }
+ Log::debug("closed pipe write end");
+ pipe_read_fd = -1;
+ }
+}
+
+DNotify::FileWatch *
+}
+
+DNotify::FileWatch *
+ }
+ p = &(*p)->hash_link;
+ }
+ }
+ p = &(*p)->hash_link;
+ }
+ }
+ p = &(*p)->hash_link;
+ }
+ }
+ p = &(*p)->hash_link;
+ }
+ Log::debug ("New DirWatch for %s (%x %x)\n",
+ notify_dir, (int)stat.st_dev, (int)stat.st_ino);
+ dwatch = new DirWatch;
+ Log::debug ("New DirWatch for %s (%x %x)\n",
+ notify_dir, (int)stat.st_dev, (int)stat.st_ino);
+ dwatch = new DirWatch;
-+ dwatch->hash_link = NULL;
++ dwatch->hash_link = 0;
+ dwatch->dir_dev = stat.st_dev;
+ dwatch->dir_ino = stat.st_ino;
+ dwatch->fd = open(notify_dir, O_RDONLY);
+ dwatch->dir_dev = stat.st_dev;
+ dwatch->dir_ino = stat.st_ino;
+ dwatch->fd = open(notify_dir, O_RDONLY);
+ // to a recycled inode that we don't otherwise care about.
+ //
+ struct stat st;
+ // to a recycled inode that we don't otherwise care about.
+ //
+ struct stat st;
+ status = &st;
+ }
+ if (::lstat(name, status) == -1) {
+ status = &st;
+ }
+ if (::lstat(name, status) == -1) {
+
+ // Lookup FileWatch by dev:ino, and its DirWatch.
+ fwatch = lookup_filewatch (dev, ino);
+
+ // Lookup FileWatch by dev:ino, and its DirWatch.
+ fwatch = lookup_filewatch (dev, ino);
+ return BAD;
+
+ // delete FileWatch, if last FileWatch: close fd, delete DirWatch
+ return BAD;
+
+ // delete FileWatch, if last FileWatch: close fd, delete DirWatch
// Express interest.
IMon::Status s = IMon::BAD;
- s = imon.express(name(), NULL);
// Express interest.
IMon::Status s = IMon::BAD;
- s = imon.express(name(), NULL);
-+ s = monitor->express(name(), NULL);
++ s = monitor->express(name(), 0);
if (s != IMon::OK) {
return true;
}
if (s != IMon::OK) {
return true;
}