[at-spi2-atk] Reentrancy fixes when using --disable-p2p



commit 0a787b81281b9b6e2ab91882e2b124ba3abe16a4
Author: Mike Gorse <mgorse linux-l2tz site>
Date:   Fri May 13 17:32:06 2011 +0200

    Reentrancy fixes when using --disable-p2p

 atk-adaptor/bridge.c |    4 ----
 atk-adaptor/event.c  |    7 +++----
 2 files changed, 3 insertions(+), 8 deletions(-)
---
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index f25f520..86bfc47 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -708,11 +708,7 @@ adaptor_init (gint * argc, gchar ** argv[])
         }
     }
 
-#ifndef DISABLE_P2P
   spi_global_app_data->main_context = g_main_context_new ();
-#else
-  spi_global_app_data->main_context = NULL;
-#endif
 
   atspi_dbus_connection_setup_with_g_main (spi_global_app_data->bus, NULL);
 
diff --git a/atk-adaptor/event.c b/atk-adaptor/event.c
index 4752ce7..d489a13 100644
--- a/atk-adaptor/event.c
+++ b/atk-adaptor/event.c
@@ -59,13 +59,11 @@ typedef struct _SpiReentrantCallClosure
 static void
 switch_main_context (GMainContext *cnx)
 {
-/* This code won't work on dbus-glib earlier than 0.9.0 because of FDO#30574 */
-  if (spi_global_app_data->app_bus_addr [0] == '\0')
-    return;
-
   GList *list;
 
+#ifndef DISABLE_P2P
   atspi_dbus_server_setup_with_g_main (spi_global_app_data->server, cnx);
+#endif
   atspi_dbus_connection_setup_with_g_main (spi_global_app_data->bus, cnx);
   for (list = spi_global_app_data->direct_connections; list; list = list->next)
     atspi_dbus_connection_setup_with_g_main (list->data, cnx);
@@ -373,6 +371,7 @@ signal_is_needed (const gchar *klass, const gchar *major, const gchar *minor)
         }
     }
 
+//printf("event: %s %s %s: %d\n", data[0], data[1], data[2], ret);
   g_free (data [2]);
   g_free (data [1]);
   g_free (data [0]);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]