summaryrefslogtreecommitdiff
path: root/bus
diff options
context:
space:
mode:
authorMike Gorse <mgorse@suse.com>2022-03-11 10:23:50 -0600
committerMike Gorse <mgorse@suse.com>2022-03-11 10:23:50 -0600
commit687832c5da0cb2ccf044261189918ceec4b32762 (patch)
treef9e806ac0e2e5abfc5dc729878c17e29300cb95c /bus
parent68367675465c409af3fa701bd3f4b299cbfe183f (diff)
downloadat-spi2-core-687832c5da0cb2ccf044261189918ceec4b32762.tar.gz
bus launcher: unlink socket before binding
Ensure_a11y_bus_broker should ensure that the socket doesn't already exist before trying to bind to it. Otherwise, binding will fail. Helps: #43
Diffstat (limited to 'bus')
-rw-r--r--bus/at-spi-bus-launcher.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c
index e552c3fb..74e9c983 100644
--- a/bus/at-spi-bus-launcher.c
+++ b/bus/at-spi-bus-launcher.c
@@ -444,7 +444,10 @@ ensure_a11y_bus_broker (A11yBusLauncher *app, char *config_path)
GError *error = NULL;
if (app->socket_name)
- strcpy (addr.sun_path, app->socket_name);
+ {
+ strcpy (addr.sun_path, app->socket_name);
+ unlink (app->socket_name);
+ }
/* This detects whether we are running under systemd. We only try to
* use dbus-broker if we are running under systemd because D-Bus