Bug 637561 - Crash when using G_DBUS_SERVER_FLAGS_RUN_IN_THREAD
authorMichael Kuhn <suraia@ikkoku.de>
Wed, 22 Dec 2010 09:11:11 +0000 (10:11 +0100)
committerDavid Zeuthen <davidz@redhat.com>
Fri, 15 Apr 2011 10:05:24 +0000 (06:05 -0400)
https://bugzilla.gnome.org/show_bug.cgi?id=637561

Signed-off-by: David Zeuthen <davidz@redhat.com>
gio/gdbusserver.c

index 9b5b8c3..964abe7 100644 (file)
@@ -979,11 +979,16 @@ on_run (GSocketService    *service,
 
   if (server->flags & G_DBUS_SERVER_FLAGS_RUN_IN_THREAD)
     {
+      gboolean claimed;
+
+      claimed = FALSE;
       g_signal_emit (server,
                      _signals[NEW_CONNECTION_SIGNAL],
                      0,
-                     connection);
-      g_dbus_connection_start_message_processing (connection);
+                     connection,
+                     &claimed);
+      if (claimed)
+        g_dbus_connection_start_message_processing (connection);
       g_object_unref (connection);
     }
   else