[Pkg-utopia-commits] r54 - in packages/gnome-volume-manager/trunk/debian: . patches
Sjoerd Simons
sjoerd@haydn.debian.org
Sun, 31 Oct 2004 07:52:28 -0700
Author: sjoerd
Date: 2004-10-31 07:52:09 -0700 (Sun, 31 Oct 2004)
New Revision: 54
Modified:
packages/gnome-volume-manager/trunk/debian/changelog
packages/gnome-volume-manager/trunk/debian/patches/11_dbus_reconnect_on_bus_exit.patch
Log:
When reconnecting, first shutdown the hal context and then unref the dbus
connection Fixes crashes on dbus restart with hal >= 0.4.0
Modified: packages/gnome-volume-manager/trunk/debian/changelog
===================================================================
--- packages/gnome-volume-manager/trunk/debian/changelog 2004-10-28 21:23:59 UTC (rev 53)
+++ packages/gnome-volume-manager/trunk/debian/changelog 2004-10-31 14:52:09 UTC (rev 54)
@@ -1,3 +1,11 @@
+gnome-volume-manager (1.0.2-4) unstable; urgency=low
+
+ * debian/patches/11_dbus_reconnect_on_bus_exit.patch
+ + Updated. When reconnecting, first shutdown the hal context and then
+ unref the dbus connection. Fixes crashes on dbus restart with hal >= 0.4.0
+
+ -- Sjoerd Simons <sjoerd@debian.org> Sun, 31 Oct 2004 14:48:28 +0100
+
gnome-volume-manager (1.0.2-3) unstable; urgency=medium
* Depend on newer debhelper for dh_desktop, which cdbs uses these days
Modified: packages/gnome-volume-manager/trunk/debian/patches/11_dbus_reconnect_on_bus_exit.patch
===================================================================
--- packages/gnome-volume-manager/trunk/debian/patches/11_dbus_reconnect_on_bus_exit.patch 2004-10-28 21:23:59 UTC (rev 53)
+++ packages/gnome-volume-manager/trunk/debian/patches/11_dbus_reconnect_on_bus_exit.patch 2004-10-31 14:52:09 UTC (rev 54)
@@ -1,5 +1,5 @@
---- gnome-volume-manager-1.0.2.orig/src/manager.c
-+++ src/manager.c
+--- src/manager.c.orig 2004-10-31 14:30:52.000000000 +0100
++++ src/manager.c 2004-10-31 14:39:55.000000000 +0100
@@ -53,6 +53,7 @@
static struct gvm_configuration config;
@@ -18,7 +18,7 @@
/*
* gvm_load_config - synchronize gconf => config structure
*/
-@@ -870,6 +874,59 @@
+@@ -870,6 +874,58 @@
{
}
@@ -30,14 +30,11 @@
+gvm_reconnect_to_hal (gpointer data __attribute__((__unused__)))
+{
+ static unsigned int retries = 0;
-+ LibHalContext *new_hal_ctx;
+
+ g_message ("Trying a reconnect ...");
-+ new_hal_ctx = gvm_do_hal_init (gvm_return_hal_functions ());
-+ if (new_hal_ctx) {
++ hal_ctx = gvm_do_hal_init (gvm_return_hal_functions ());
++ if (hal_ctx != NULL) {
+ g_message ("Reconnected OK.");
-+ hal_shutdown (hal_ctx);
-+ hal_ctx = new_hal_ctx;
+ retries = 0;
+ return FALSE;
+ }
@@ -67,6 +64,8 @@
+ DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL,
+ "Disconnected")) {
+ g_timeout_add(500, gvm_reconnect_to_hal, NULL);
++ hal_shutdown (hal_ctx);
++ hal_ctx = NULL;
+ dbus_connection_unref (dbus_ctx);
+ dbus_ctx = NULL;
+ return DBUS_HANDLER_RESULT_HANDLED;
@@ -78,7 +77,7 @@
/** Invoked by libhal for integration with our mainloop.
*
* @param ctx LibHal context
-@@ -879,7 +936,12 @@
+@@ -879,7 +935,12 @@
hal_mainloop_integration (LibHalContext *ctx __attribute__((__unused__)),
DBusConnection * dbus_connection)
{
@@ -91,7 +90,21 @@
}
/** Internal HAL initialization function
-@@ -1069,17 +1131,23 @@
+@@ -997,7 +1058,12 @@
+ char *device_file;
+ char *udi;
+
+- dbg ("unmounting all volumes that we saw mounted in our life\n");
++ if (ctx == NULL) {
++ dbg("No hal connection! can't unmount volumes");
++ return;
++ } else {
++ dbg ("unmounting all volumes that we saw mounted in our life\n");
++ }
+
+ for (i = all_mounted_volumes; i != NULL; i = g_slist_next (i)) {
+
+@@ -1069,17 +1135,23 @@
gtk_main_quit ();
}
@@ -122,7 +135,7 @@
gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
argc, argv, GNOME_PARAM_NONE);
-@@ -1100,7 +1168,7 @@
+@@ -1100,7 +1172,7 @@
gtk_signal_connect (GTK_OBJECT (client), "die",
GTK_SIGNAL_FUNC (gvm_die), NULL);