? Makefile ? Makefile.in ? aclocal.m4 ? autom4te.cache ? config.h ? config.h.in ? config.log ? config.status ? configure ? gamin.pc ? gamin.spec ? libtool ? stamp-h1 ? doc/Makefile ? doc/Makefile.in ? lib/Makefile ? lib/Makefile.in ? libgamin/Makefile ? libgamin/Makefile.in ? libgamin/gam_error.c ? libgamin/gam_event.c ? libgamin/gamin ? python/Makefile ? python/Makefile.in ? python/tests/Makefile ? python/tests/Makefile.in ? server/Makefile ? server/Makefile.in ? server/gam_server ? tests/Makefile ? tests/Makefile.in ? tests/testgam Index: server/gam_inotify.c =================================================================== RCS file: /cvs/gnome/gamin/server/gam_inotify.c,v retrieving revision 1.21 diff -u -r1.21 gam_inotify.c --- server/gam_inotify.c 10 May 2005 09:29:52 -0000 1.21 +++ server/gam_inotify.c 23 May 2005 17:41:20 -0000 @@ -168,10 +168,10 @@ GAM_DEBUG(DEBUG_INFO, "Removing %s from inotify\n", path); break; case GAMIN_FLOWCONTROLSTART: - GAM_DEBUG(DEBUG_INFO, "Start flow control for %s\n", path); + GAM_DEBUG(DEBUG_INFO, "inotify: Start flow control for %s\n", path); break; case GAMIN_FLOWCONTROLSTOP: - GAM_DEBUG(DEBUG_INFO, "Stop flow control for %s\n", path); + GAM_DEBUG(DEBUG_INFO, "inotify: Stop flow control for %s\n", path); break; default: gam_error(DEBUG_INFO, "Unknown inotify operation %d for %s\n", @@ -281,8 +281,10 @@ } GAM_DEBUG(DEBUG_INFO, " not found using parent\n"); } +#if 0 if (data != NULL) { if (mode == GAMIN_FLOWCONTROLSTART) { + GAM_DEBUG(DEBUG_INFO, "inotify: GAMIN_FLOWCONTROLSTART for %s\n", data->path); if (data->wd >= 0) { if (ioctl (inotify_device_fd, INOTIFY_IGNORE, &data->wd) < 0) { GAM_DEBUG (DEBUG_INFO, "INOTIFY_IGNORE failed for %s (wd = %d)\n", data->path, data->wd); @@ -296,14 +298,17 @@ } data->busy++; } else { + GAM_DEBUG(DEBUG_INFO, "inotify: GAMIN_FLOWCONTROLSTOP for %s\n", data->path); if (data->busy > 0) { + GAM_DEBUG(DEBUG_INFO, "inotify: data->busy > 0 for %s\n", data->path); data->busy--; if (data->busy == 0) { + GAM_DEBUG(DEBUG_INFO, "inotify: data->busy == 0 for %s\n", data->path); path_fd = open(data->path, O_RDONLY); if (path_fd < 0) { G_UNLOCK(inotify); GAM_DEBUG(DEBUG_INFO, - "Failed to reactivate inotify for %s\n", + "failed to reactivate inotify for %s\n", data->path); if ((dir != path) && (dir != NULL)) @@ -317,7 +322,7 @@ close (path_fd); /* Remove the old wd from the hash table */ - g_hash_table_remove(wd_hash, GINT_TO_POINTER(data->wd)); + g_hash_table_remove(wd_hash, GINT_TO_POINTER(data->wd)); data->wd = path_wd; data->deactivated = FALSE; @@ -325,7 +330,7 @@ /* Insert the new wd into the hash table */ g_hash_table_insert(wd_hash, GINT_TO_POINTER(data->wd), data); - GAM_DEBUG(DEBUG_INFO, "Reactivated inotify for %s\n", + GAM_DEBUG(DEBUG_INFO, "reactivated inotify for %s\n", data->path); #ifdef GAMIN_DEBUG_API gam_debug_report(GAMinotifyFlowOff, path, 0); @@ -334,6 +339,7 @@ } } } +#endif if ((dir != path) && (dir != NULL)) g_free(dir); } else { @@ -420,12 +426,15 @@ data = g_hash_table_lookup (wd_hash, GINT_TO_POINTER(event->wd)); if (!data) { - GAM_DEBUG(DEBUG_INFO, "inotify can't find wd %d\n", event->wd); + GAM_DEBUG(DEBUG_INFO, "processing event: inotify can't find wd %d\n", event->wd); + } else if (data->deactivated) { + GAM_DEBUG(DEBUG_INFO, "inotify: ignoring event on temporarily deactivated watch %s\n", data->path); } else { if (event->mask == IN_IGNORED) { GList *l; - GAM_DEBUG(DEBUG_INFO, "inotify ignoring wd %d\n", event->wd); + GAM_DEBUG(DEBUG_INFO, "inotify: IN_IGNORE on wd=%d\n", event->wd); + GAM_DEBUG(DEBUG_INFO, "inotify: removing all subscriptions for %s\n", data->path); l = data->subs; data->subs = NULL; @@ -441,7 +450,8 @@ gam_poll_scan_directory (data->path); } } else if (event->mask == IN_Q_OVERFLOW) { - GAM_DEBUG(DEBUG_INFO, "inotify queue over flowed\n"); + GAM_DEBUG(DEBUG_INFO, "inotify queue over flowed\n"); + GAM_DEBUG(DEBUG_INFO, "FIXME, should request poll for all paths here\n"); } } Index: server/gam_server.c =================================================================== RCS file: /cvs/gnome/gamin/server/gam_server.c,v retrieving revision 1.22 diff -u -r1.22 gam_server.c --- server/gam_server.c 9 May 2005 13:45:55 -0000 1.22 +++ server/gam_server.c 23 May 2005 17:41:20 -0000 @@ -99,6 +99,8 @@ if (gam_inotify_init()) { GAM_DEBUG(DEBUG_INFO, "Using INotify as backend\n"); return(TRUE); + } else { + printf("Not using inotify backend\n"); } #endif #ifdef ENABLE_DNOTIFY