Correctly remove the socket on exit
authorMike Gorse <mgorse@suse.com>
Sat, 19 Jul 2014 20:01:42 +0000 (15:01 -0500)
committerMike Gorse <mgorse@suse.com>
Sat, 19 Jul 2014 20:01:42 +0000 (15:01 -0500)
https://bugzilla.gnome.org/show_bug.cgi?id=684076

atk-adaptor/bridge.c

index 2da29a71dbdf3e32aec09f105f43750bb8beab4b..9c2117f53fb2478dc0198763dd0e3b37793fbac2 100644 (file)
@@ -452,9 +452,10 @@ remove_socket ()
   if (!spi_global_app_data)
     return;
 
-  if (spi_global_app_data->app_bus_addr)
+  if (spi_global_app_data->app_bus_addr &&
+      !strncmp (spi_global_app_data->app_bus_addr, "unix:path=", 10))
   {
-    unlink (spi_global_app_data->app_bus_addr);
+    unlink (spi_global_app_data->app_bus_addr + 10);
     g_free (spi_global_app_data->app_bus_addr);
     spi_global_app_data->app_bus_addr = NULL;
   }