Blame SOURCES/0001-metadata-GDBusServer-new-connection-signal-needs-a-r.patch

4dca99
From 76540fdaa7baf56b01d8d269cbe482b1dbc58f09 Mon Sep 17 00:00:00 2001
4dca99
From: Jonathan Matthew <jonathan@d14n.org>
4dca99
Date: Fri, 13 Sep 2013 22:19:13 +1000
4dca99
Subject: [PATCH] metadata: GDBusServer new-connection signal needs a return
4dca99
 value
4dca99
4dca99
Turns out this is kind of important and has been working mostly by
4dca99
luck until now.  When compiled with gcc's -fstack-protector-strong,
4dca99
we ended up returning 0, which in this case means that the connection
4dca99
isn't interesting, so it stops processing messages on it.
4dca99
4dca99
https://bugzilla.gnome.org/show_bug.cgi?id=706470
4dca99
---
4dca99
 metadata/rb-metadata-dbus-service.c | 6 ++++--
4dca99
 1 file changed, 4 insertions(+), 2 deletions(-)
4dca99
4dca99
diff --git a/metadata/rb-metadata-dbus-service.c b/metadata/rb-metadata-dbus-service.c
4dca99
index cb29d33..8280b2c 100644
4dca99
--- a/metadata/rb-metadata-dbus-service.c
4dca99
+++ b/metadata/rb-metadata-dbus-service.c
4dca99
@@ -220,7 +220,7 @@ connection_closed_cb (GDBusConnection *connection,
4dca99
 	svc->connection = NULL;
4dca99
 }
4dca99
 
4dca99
-static void
4dca99
+static gboolean
4dca99
 new_connection_cb (GDBusServer *server,
4dca99
 		   GDBusConnection *connection,
4dca99
 		   ServiceData *svc)
4dca99
@@ -231,7 +231,7 @@ new_connection_cb (GDBusServer *server,
4dca99
 	/* don't allow more than one connection at a time */
4dca99
 	if (svc->connection) {
4dca99
 		rb_debug ("metadata service already has a client.  go away.");
4dca99
-		return;
4dca99
+		return FALSE;
4dca99
 	}
4dca99
 	g_dbus_connection_register_object (connection,
4dca99
 					   RB_METADATA_DBUS_OBJECT_PATH,
4dca99
@@ -243,11 +243,13 @@ new_connection_cb (GDBusServer *server,
4dca99
 	if (error != NULL) {
4dca99
 		rb_debug ("unable to register metadata object: %s", error->message);
4dca99
 		g_clear_error (&error);
4dca99
+		return FALSE;
4dca99
 	} else {
4dca99
 		svc->connection = g_object_ref (connection);
4dca99
 		g_signal_connect (connection, "closed", G_CALLBACK (connection_closed_cb), svc);
4dca99
 
4dca99
 		g_dbus_connection_set_exit_on_close (connection, (svc->external == FALSE));
4dca99
+		return TRUE;
4dca99
 	}
4dca99
 }
4dca99
 
4dca99
-- 
4dca99
1.8.5.3
4dca99