diff -u gnome-vfs2-2.16.1/debian/changelog gnome-vfs2-2.16.1/debian/changelog --- gnome-vfs2-2.16.1/debian/changelog +++ gnome-vfs2-2.16.1/debian/changelog @@ -1,3 +1,12 @@ +gnome-vfs2 (2.16.1-0ubuntu3) edgy-proposed; urgency=low + + * debian/patches/90_from_cvs_fix_loop_on_monitor_cancel.patch: + - patch from CVS updated to apply to current version, fix monitoring code + looping, make nautilus eats cpu when viewing a directory with activity + and refreshing it (Ubuntu: #54684) + + -- Sebastien Bacher Thu, 2 Nov 2006 21:58:08 +0100 + gnome-vfs2 (2.16.1-0ubuntu2) edgy; urgency=low * Add debian/patches/24_daemon_set_locale.patch: Call setlocale() in only in patch2: unchanged: --- gnome-vfs2-2.16.1.orig/debian/patches/90_from_cvs_fix_loop_on_monitor_cancel.patch +++ gnome-vfs2-2.16.1/debian/patches/90_from_cvs_fix_loop_on_monitor_cancel.patch @@ -0,0 +1,83 @@ +diff -Nur gnome-vfs2-2.16.1/libgnomevfs/gnome-vfs-monitor.c gnome-vfs2-2.16.1.new/libgnomevfs/gnome-vfs-monitor.c +--- gnome-vfs2-2.16.1/libgnomevfs/gnome-vfs-monitor.c 2006-07-21 19:13:28.000000000 +0200 ++++ gnome-vfs2-2.16.1.new/libgnomevfs/gnome-vfs-monitor.c 2006-11-02 22:07:27.000000000 +0100 +@@ -45,6 +45,7 @@ + gpointer user_data; /* FIXME - how does this get freed */ + + gboolean cancelled; ++ gboolean in_dispatch; + + GList *pending_callbacks; /* protected by handle_hash */ + guint pending_timeout; /* protected by handle_hash */ +@@ -155,7 +156,8 @@ + { + gboolean res; + +- g_assert (no_live_callbacks (handle)); ++ if (handle->pending_timeout) ++ g_source_remove (handle->pending_timeout); + + g_list_foreach (handle->pending_callbacks, (GFunc) free_callback_data, NULL); + g_list_free (handle->pending_callbacks); +@@ -188,12 +190,15 @@ + handle->method_handle); + + if (result == GNOME_VFS_OK) { ++ G_LOCK (handle_hash); + /* mark this monitor as cancelled */ + handle->cancelled = TRUE; + +- /* destroy the handle if there are no outstanding callbacks */ +- G_LOCK (handle_hash); +- if (no_live_callbacks (handle)) { ++ /* we might be in the unlocked part of actually_dispatch_callback, ++ * in that case, don't free the handle now. ++ * Instead we do it in actually_dispatch_callback. ++ */ ++ if (!handle->in_dispatch) { + destroy_monitor_handle (handle); + } + G_UNLOCK (handle_hash); +@@ -202,6 +207,7 @@ + return result; + } + ++/* Called with handle_hash lock held */ + static void + install_timeout (GnomeVFSMonitorHandle *monitor_handle, time_t now) + { +@@ -236,6 +242,10 @@ + + G_LOCK (handle_hash); + ++ /* Mark this so that do_cancel doesn't free the handle while ++ * we run without the lock during dispatch */ ++ monitor_handle->in_dispatch = TRUE; ++ + if (!monitor_handle->cancelled) { + /* Find all callbacks that needs to be dispatched */ + dispatch = NULL; +@@ -306,14 +316,15 @@ + + } + +- if (no_live_callbacks (monitor_handle)) { +- /* if we were waiting for this callback to be dispatched +- * to free this monitor, then do it now. +- */ +- if (monitor_handle->cancelled) +- destroy_monitor_handle (monitor_handle); +- else +- monitor_handle->pending_timeout = 0; ++ monitor_handle->in_dispatch = FALSE; ++ ++ /* if we were waiting for this callback to be dispatched ++ * to free this monitor, then do it now. ++ */ ++ if (monitor_handle->cancelled) { ++ destroy_monitor_handle (monitor_handle); ++ } else if (no_live_callbacks (monitor_handle)) { ++ monitor_handle->pending_timeout = 0; + } else + /* pending callbacks left, install another timeout */ + install_timeout (monitor_handle, now);