Hello community,
here is the log from the commit of package evolution
checked in at Thu Apr 20 01:03:44 CEST 2006.
--------
--- GNOME/evolution/evolution.changes 2006-04-19 12:09:22.000000000 +0200
+++ STABLE/evolution/evolution.changes 2006-04-19 23:13:43.000000000 +0200
@@ -1,0 +2,7 @@
+Wed Apr 19 23:12:09 CEST 2006 - fejj@suse.de
+
+- Added bnc-159736-dbus-restart.patch to the build which replaces
+ survive-dbus-restarts.patch (it solves the same problem plus more
+ instances of the same)
+
+-------------------------------------------------------------------
Old:
----
survive-dbus-restart.patch
New:
----
bnc-159736-dbus-restart.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ evolution.spec ++++++
--- /var/tmp/diff_new_pack.MM7nVa/_old 2006-04-20 01:03:22.000000000 +0200
+++ /var/tmp/diff_new_pack.MM7nVa/_new 2006-04-20 01:03:22.000000000 +0200
@@ -21,7 +21,7 @@
Autoreqprov: on
Obsoletes: bonobo-conf
Version: 2.6.0
-Release: 24
+Release: 26
Summary: The Integrated GNOME Mail, Calendar, and Address Book Suite
Source: ftp://ftp.gnome.org/pub/gnome/sources/evolution/2.6/%{name}-%{version}.tar.bz2
Source1: summerdance-about2.png
@@ -62,7 +62,7 @@
Patch43: bgo-330842-evo-crashed-when-idle-inactive.patch
Patch44: bnc-150427-addressbook-setup.patch
Patch45: bnc-153807-msg-composer-dont-raise.patch
-Patch46: survive-dbus-restart.patch
+Patch46: bnc-159736-dbus-restart.patch
Patch47: bnc-158107-no-notification-canceled-mtgs.patch
Patch48: bnc-160049-change-gw-passwd-no-auth-prompt.patch
Patch49: bnc-160357-busy-search-not-working.patch
@@ -462,6 +462,10 @@
%{prefix}/share/gnome-pilot/conduits/*.conduit
%changelog -n evolution
+* Wed Apr 19 2006 - fejj@suse.de
+- Added bnc-159736-dbus-restart.patch to the build which replaces
+ survive-dbus-restarts.patch (it solves the same problem plus more
+ instances of the same)
* Wed Apr 19 2006 - sragavan@novell.com
- alarm-fixes.patch: Updated alarm fixes - Srini
- Fixes (bgo)
++++++ bnc-159736-dbus-restart.patch ++++++
Index: plugins/new-mail-notify/new-mail-notify.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/new-mail-notify/new-mail-notify.c,v
retrieving revision 1.7
diff -u -r1.7 plugins/new-mail-notify/new-mail-notify.c
--- plugins/new-mail-notify/new-mail-notify.c 24 Aug 2005 03:12:29 -0000 1.7
+++ plugins/new-mail-notify/new-mail-notify.c 18 Apr 2006 15:25:25 -0000
@@ -35,24 +35,24 @@
#define DBUS_PATH "/org/gnome/evolution/mail/newmail"
#define DBUS_INTERFACE "org.gnome.evolution.mail.dbus.Signal"
+int e_plugin_lib_enable (EPluginLib *ep, int enable);
void org_gnome_new_mail_notify (EPlugin *ep, EMEventTargetFolder *t);
void org_gnome_message_reading_notify (EPlugin *ep, EMEventTargetMessage *t);
-static DBusConnection *bus;
+static gboolean init_dbus (void);
+
+static DBusConnection *bus = NULL;
+static gboolean enabled = FALSE;
static void
-send_dbus_message (const char *message_name, const char *data)
+send_dbus_message (const char *name, const char *data)
{
DBusMessage *message;
-
+
/* Create a new message on the DBUS_INTERFACE */
- message = dbus_message_new_signal (DBUS_PATH,
- DBUS_INTERFACE,
- message_name);
-
- if (message == NULL)
+ if (!(message = dbus_message_new_signal (DBUS_PATH, DBUS_INTERFACE, name)))
return;
-
+
/* Appends the data as an argument to the message */
dbus_message_append_args (message,
#if DBUS_VERSION >= 310
@@ -63,10 +63,8 @@
DBUS_TYPE_INVALID);
/* Sends the message */
- dbus_connection_send (bus,
- message,
- NULL);
-
+ dbus_connection_send (bus, message, NULL);
+
/* Frees the message */
dbus_message_unref (message);
}
@@ -74,39 +72,86 @@
void
org_gnome_message_reading_notify (EPlugin *ep, EMEventTargetMessage *t)
{
- send_dbus_message ("MessageReading", t->folder->name);
+ if (bus != NULL)
+ send_dbus_message ("MessageReading", t->folder->name);
}
void
org_gnome_new_mail_notify (EPlugin *ep, EMEventTargetFolder *t)
{
- send_dbus_message ("Newmail", t->uri);
+ if (bus != NULL)
+ send_dbus_message ("Newmail", t->uri);
+}
+
+
+static gboolean
+reinit_dbus (gpointer user_data)
+{
+ if (!enabled || init_dbus ())
+ return FALSE;
+
+ /* keep trying to re-establish dbus connection */
+
+ return TRUE;
+}
+
+static DBusHandlerResult
+filter_function (DBusConnection *connection, DBusMessage *message, void *user_data)
+{
+ if (dbus_message_is_signal (message, DBUS_INTERFACE_LOCAL, "Disconnected") &&
+ strcmp (dbus_message_get_path (message), DBUS_PATH_LOCAL) == 0) {
+ dbus_connection_unref (bus);
+ bus = NULL;
+
+ g_timeout_add (3000, reinit_dbus, NULL);
+
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+static gboolean
+init_dbus (void)
+{
+ DBusError error;
+
+ if (bus != NULL)
+ return TRUE;
+
+ dbus_error_init (&error);
+ if (!(bus = dbus_bus_get (DBUS_BUS_SESSION, &error))) {
+ g_warning ("could not get system bus: %s\n", error.message);
+ dbus_error_free (&error);
+ return FALSE;
+ }
+
+ dbus_connection_setup_with_g_main (bus, NULL);
+ dbus_connection_set_exit_on_disconnect (bus, FALSE);
+
+ dbus_connection_add_filter (bus, filter_function, NULL, NULL);
+
+ return TRUE;
}
-int e_plugin_lib_enable (EPluginLib *ep, int enable);
int
e_plugin_lib_enable (EPluginLib *ep, int enable)
{
if (enable) {
- DBusError error;
-
- dbus_error_init (&error);
- bus = dbus_bus_get (DBUS_BUS_SESSION, &error);
- if (!bus) {
- g_warning("Failed to connect to the D-BUS daemon: %s\n", error.message);
-
- /* Could not determine address of the D-BUS session bus */
- /* Plugin will be disabled */
- dbus_error_free (&error);
+ if (!init_dbus ())
return -1;
+
+ enabled = TRUE;
+ } else {
+ if (bus != NULL) {
+ dbus_connection_unref (bus);
+ bus = NULL;
}
-
- /* Set up this connection to work in a GLib event loop */
- dbus_connection_setup_with_g_main (bus, NULL);
+
+ enabled = FALSE;
}
- /* else unref the bus if set? */
-
+
return 0;
}
Index: shell/e-shell-nm.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-nm.c,v
retrieving revision 1.1
diff -u -r1.1 shell/e-shell-nm.c
--- shell/e-shell-nm.c 22 Dec 2005 02:12:34 -0000 1.1
+++ shell/e-shell-nm.c 18 Apr 2006 15:48:28 -0000
@@ -1,3 +1,4 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Shreyas Srinivasan
participants (1)
-
root@suse.de