[evolution-data-server/evolution-data-server-3-12] Bug #726060 - Password prompt initiated before D-Bus name acquired
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/evolution-data-server-3-12] Bug #726060 - Password prompt initiated before D-Bus name acquired
- Date: Wed, 26 Mar 2014 07:23:16 +0000 (UTC)
commit b4665e2b078f98cdc5b183dc9bc56ddb51fc1ddc
Author: Milan Crha <mcrha redhat com>
Date: Wed Mar 26 08:23:33 2014 +0100
Bug #726060 - Password prompt initiated before D-Bus name acquired
.../evolution-source-registry.c | 31 +++++++++++++------
1 files changed, 21 insertions(+), 10 deletions(-)
---
diff --git a/services/evolution-source-registry/evolution-source-registry.c
b/services/evolution-source-registry/evolution-source-registry.c
index 8afeebc..b258c81 100644
--- a/services/evolution-source-registry/evolution-source-registry.c
+++ b/services/evolution-source-registry/evolution-source-registry.c
@@ -121,6 +121,22 @@ evolution_source_registry_load_all (ESourceRegistryServer *server,
return TRUE;
}
+static void
+evolution_source_registry_load_sources (ESourceRegistryServer *server,
+ GDBusConnection *connection)
+{
+ GError *error = NULL;
+
+ /* Failure here is fatal. Don't even try to keep going. */
+ evolution_source_registry_load_all (server, &error);
+
+ if (error != NULL) {
+ g_printerr ("%s\n", error->message);
+ g_object_unref (server);
+ exit (EXIT_FAILURE);
+ }
+}
+
gint
main (gint argc,
gchar **argv)
@@ -172,6 +188,11 @@ reload:
evolution_source_registry_load_error),
NULL);
+ /* Postpone the sources load only after the D-Bus name is acquired */
+ g_signal_connect (
+ server, "bus-acquired",
+ G_CALLBACK (evolution_source_registry_load_sources), NULL);
+
/* Convert "imap" mail accounts to "imapx". */
if (!opt_disable_migration)
g_signal_connect (
@@ -179,16 +200,6 @@ reload:
evolution_source_registry_migrate_imap_to_imapx),
NULL);
- /* Failure here is fatal. Don't even try to keep going. */
- evolution_source_registry_load_all (
- E_SOURCE_REGISTRY_SERVER (server), &error);
-
- if (error != NULL) {
- g_printerr ("%s\n", error->message);
- g_object_unref (server);
- exit (EXIT_FAILURE);
- }
-
g_debug ("Server is up and running...");
/* Keep the server from quitting on its own.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]