/* Elisp bindings for D-Bus.
- Copyright (C) 2007-2014 Free Software Foundation, Inc.
+ Copyright (C) 2007-2015 Free Software Foundation, Inc.
This file is part of GNU Emacs.
ptrdiff_t xlen = strlen (x);
if (DBUS_MAXIMUM_SIGNATURE_LENGTH - xlen <= siglen)
string_overflow ();
- strcat (signature, x);
+ strcpy (signature + siglen, x);
}
/* Compute SIGNATURE of OBJECT. It must have a form that it can be
/* Unset session environment. */
#if 0
+ /* This is buggy, since unsetenv is not thread-safe. */
if (XSYMBOL (QCdbus_session_bus) == data)
{
XD_DEBUG_MESSAGE ("unsetenv DBUS_SESSION_BUS_ADDRESS");
XSETFASTINT (val, (intptr_t) connection);
xd_registered_buses = Fcons (Fcons (bus, val), xd_registered_buses);
- /* We do not want to abort. */
- xputenv ("DBUS_FATAL_WARNINGS=0");
-
/* Cleanup. */
dbus_error_free (&derror);
}
}
\f
+void
+init_dbusbind (void)
+{
+ /* We do not want to abort. */
+ xputenv ("DBUS_FATAL_WARNINGS=0");
+}
+
void
syms_of_dbusbind (void)
{