#include "event.h"
#include "adaptors.h"
#include "object.h"
+#include "common/spi-stateset.h"
#include "accessible-register.h"
#include "accessible-leasing.h"
(long) BUFSIZ, False,
(Atom) 31, &actual_type, &actual_format,
&nitems, &leftover, &data);
+ XCloseDisplay (bridge_display);
dbus_error_init (&error);
else
{
bus = dbus_connection_open (data, &error);
+ XFree (data);
if (!bus)
{
g_warning ("AT-SPI: Couldn't connect to bus: %s\n", error.message);
g_warning ("AT-SPI: Couldn't register with bus: %s\n", error.message);
return NULL;
}
+ dbus_connection_set_exit_on_disconnect (bus, FALSE);
}
}
if (message)
dbus_message_unref (message);
-/* could this be better, we accept some amount of race in getting the temp name*/
-/* make sure the directory exists */
-mkdir("/tmp/at-spi2/", S_IRWXU);
-app->app_bus_addr = g_malloc(max_addr_length * sizeof(char));
+ /* could this be better, we accept some amount of race in getting the temp name*/
+ /* make sure the directory exists */
+ mkdir ("/tmp/at-spi2/", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX);
+ chmod ("/tmp/at-spi2/", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX);
+ app->app_bus_addr = g_malloc(max_addr_length * sizeof(char));
#ifndef DISABLE_P2P
-sprintf(app->app_bus_addr, "unix:path=/tmp/at-spi2/socket-%d-%d", getpid(),
-rand());
+ sprintf (app->app_bus_addr, "unix:path=/tmp/at-spi2/socket-%d-%d", getpid(),
+ rand());
#else
app->app_bus_addr [0] = '\0';
#endif
list = list->next;
}
}
+
+ g_strfreev (remove_data);
}
static void
g_option_context_set_ignore_unknown_options (opt, TRUE);
if (!g_option_context_parse (opt, argc, argv, &err))
g_warning ("AT-SPI Option parsing failed: %s\n", err->message);
+ g_option_context_free (opt);
/* Allocate global data and do ATK initializations */
spi_global_app_data = g_new0 (SpiBridge, 1);