[at-spi2-core: 3/5] spi_atk_create_socket() - Do not use the global data




commit f04ce7f1787218186b06f4e39577f472739948fd
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Jun 9 20:42:31 2022 -0500

    spi_atk_create_socket() - Do not use the global data
    
    The SpiBridge is passed as an argument; no need to use global data here.

 atk-adaptor/bridge.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/atk-adaptor/bridge.c b/atk-adaptor/bridge.c
index 8cb6ecc4..c114c9dc 100644
--- a/atk-adaptor/bridge.c
+++ b/atk-adaptor/bridge.c
@@ -953,23 +953,23 @@ spi_atk_create_socket (SpiBridge *app)
     app->app_bus_addr = g_strdup_printf ("unix:path=%s/at-spi2-socket-%d",
                                          user_runtime_dir, getpid ());
 
-  if (!spi_global_app_data->app_bus_addr)
+  if (!app->app_bus_addr)
     return -1;
 
   dbus_error_init(&error);
-  server = dbus_server_listen(spi_global_app_data->app_bus_addr, &error);
+  server = dbus_server_listen(app->app_bus_addr, &error);
   if (server == NULL)
   {
     g_warning ("atk-bridge: Couldn't listen on dbus server: %s", error.message);
     dbus_error_free (&error);
-    spi_global_app_data->app_bus_addr [0] = '\0';
+    app->app_bus_addr [0] = '\0';
     return -1;
   }
 
   atspi_dbus_server_setup_with_g_main(server, spi_context);
   dbus_server_set_new_connection_function(server, new_connection_cb, NULL, NULL);
 
-  spi_global_app_data->server = server;
+  app->server = server;
 #endif
 
   return 0;


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