Commit 179af6d3 authored by Simon McVittie's avatar Simon McVittie

Imported Upstream version 1.5.8

parent 3ec6cdd0
......@@ -4,18 +4,16 @@ Anders Carlsson <andersca@codefactory.se>
Andre Heinecke <aheinecke@intevation.de>
Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Aurelien Jarno <aurel32@debian.org>
Benjamin Reed <ranger@befunk.com>
Benjamin Reed <rangerrick@befunk.com>
Benjamin Reed <ranger@Sin.local>
Brian Cameron <brian.cameron@oracle.com>
Brian Cameron <brian.cameron@sun.com>
Chris Mayo <aklhfex gmail com>
Christian Dywan <christian.dywan@lanedo.com>
Christian Dywan <christian@lanedo.com>
Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
Christian Persch (GNOME) <chpe@gnome.org>
Colin Walters <walters@lightbox.localdomain>
Colin Walters <walters@space-ghost.verbum.private>
Colin Walters <walters@verbum.org>
Colin Watson <cjwatson@ubuntu.com>
Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Cristian Rodríguez <cristian.rodriguez@opensuse.org>
Cyril Brulebois <kibi@debian.org>
Daniel P. Berrange <dan@berrange.com>
......@@ -32,7 +30,6 @@ Grzegorz Dąbrowski <gdx@poczta.fm>
Harald Fernengel <harry@kdevelop.org>
Harri Porten <porten@kde.org>
Hasso Tepper <hasso@estpak.ee>
Havoc Pennington <hp@localhost.localdomain>
Havoc Pennington <hp@pobox.com>
Havoc Pennington <hp@redhat.com>
Hendrik Buschmeier <hbuschme@TechFak.Uni-Bielefeld.DE>
......@@ -41,6 +38,7 @@ James Westby <jw+debian@jameswestby.net>
James Willcox <jwillcox@gnome.org>
Jens Granseuer <jensgr@gmx.net>
Jérémie Dimino <jeremie@dimino.org>
Jiří Klimeš <jklimes@redhat.com>
Joe Marcus Clarke <marcus@freedesktop.org>
Joe Shaw <joeshaw@novell.com>
Johan Gyllenspetz <johangy@axis.com>
......@@ -87,8 +85,6 @@ Peter McCurdy <pmccurdy@skeptopotamus>
Philip Blundell <philb@gnu.org>
Plácido Revilla <unknown@unknown.domain>
Ralf Habacker <ralf.habacker@freenet.de>
Ralf Habacker <Ralf.Habacker@freenet.de>
Ralf Habacker <ralf@s15291359.onlinehome-server.info>
Ray Strode <rstrode@redhat.com>
Richard A. Hankins <richard.a.hankins@gmail.com>
Richard Hughes <richard@hughsie.com>
......@@ -99,6 +95,7 @@ Roberto Guido <bob4job@gmail.com>
Romain Pokrzywka <romain@kdab.com>
Ross Burton <ross@openedhand.com>
Ryan Lortie <desrt@desrt.ca>
Sascha Silbe <sascha-pgp@silbe.org>
Sascha Silbe <sascha-web-bugs.freedesktop.org@silbe.org>
Scott James Remnant <scott@netsplit.com>
Scott James Remnant <scott@ubuntu.com>
......@@ -107,6 +104,7 @@ Seth Nickell <seth@gnome.org>
Simon McVittie <simon.mcvittie@collabora.co.uk>
Sjoerd Simons <sjoerd@luon.net>
Sledz <sledz@MOBIL-400-586.intern.dresearch.de>
Steve Grubb <sgrubb@redhat.com>
Sven Herzberg <sven@imendio.com>
Thiago Macieira <thiago@kde.org>
Tim Dijkstra <tim@famdijkstra.org>
......@@ -115,8 +113,6 @@ Tomas Hoger <thoger@redhat.com>
Tomas Pelka <tpelka@redhat.com>
Tom Hughes <tom.hughes@palm.com>
Tor Lillqvist <tml@iki.fi>
unknown <Administrator@.(none)>
unknown <Habacker@.(none)>
Waldo Bastian <bastian@kde.org>
William Lachance <wrlach@gmail.com>
Will Thompson <will.thompson@collabora.co.uk>
......
......@@ -310,6 +310,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
......@@ -385,9 +390,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
......
D-Bus 1.5.8 (2011-09-21)
==
The "cross-metering" release.
In addition to dead code removal and refactoring, this release contains all
of the bugfixes from 1.4.16.
• Clean up dead code, and make more warnings fatal in development builds
(fd.o #39231, fd.o #41012; Simon McVittie)
• If full test coverage is requested via --enable-tests, strictly require
Python, pygobject and dbus-python, which are required by some tests; if not,
and Python is missing, skip those tests rather than failing
(fd.o #37847, Simon McVittie)
• When using cmake, provide the same version-info API in the installed headers
as for autotools (DBUS_VERSION, etc.) (fd.o #40905, Ralf Habacker)
• Add a regression test for fd.o #38005 (fd.o #39836, Simon McVittie)
• Make "NOCONFIGURE=1 ./autogen.sh" not run configure (Colin Walters)
• Add _DBUS_STATIC_ASSERT and use it to check invariants (fd.o #39636,
Simon McVittie)
• Fix duplicates in authors list (Ralf Habacker)
• Fix broken links from dbus-tutorial.html if $(htmldir) != $(docdir)
(fd.o #39879, Chris Mayo)
• Fix a small memory leak, and a failure to report errors, when updating
a service file entry for activation (fd.o #39230, Simon McVittie)
• Unix-specific:
· Clean up (non-abstract) Unix sockets on bus daemon exit (fd.o #38656;
Brian Cameron, Simon McVittie)
· On systems that use libcap-ng but not systemd, drop supplemental groups
when switching to the daemon user (Red Hat #726953, Steve Grubb)
· Make the cmake build work again on GNU platforms (fd.o #29228,
Simon McVittie)
· Fix compilation on non-C99 systems that have inttypes.h but not stdint.h,
like Solaris (fd.o #40313, Dagobert Michelsen)
· Define CMSG_ALIGN, CMSG_LEN, CMSG_SPACE on Solaris < 10
(fd.o #40235, Simon McVittie)
· Cope with Unixes that don't have LOG_PERROR, like Solaris 10
(fd.o #39987, Simon McVittie)
· Cope with platforms whose vsnprintf violates both POSIX and C99, like
Tru64, IRIX and HP-UX (fd.o #11668, Simon McVittie)
• Windows-specific:
· Fix compilation on MSVC, which doesn't understand "inline" with its
C99 meaning (fd.o #40000; Ralf Habacker, Simon McVittie)
· Fix misuse of GPid in test/dbus-daemon.c (fd.o #40003, Simon McVittie)
· Fix cross-compilation to Windows with Automake (fd.o #40003, Simon McVittie)
D-Bus 1.5.6 (2011-07-29)
==
......
The cygwin dbus port is included in master branch of
dbus git repository since 1.3.1.
See cygwin/README for more information about
the cygwin dbus port.
The cygwin port of dbus is maintained by:
http://sourceware.org/cygwinports/
......@@ -816,6 +816,211 @@ AC_DEFUN([_AM_SET_OPTIONS],
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
# ---------------------------------------------------------------------------
# Adds support for distributing Python modules and packages. To
# install modules, copy them to $(pythondir), using the python_PYTHON
# automake variable. To install a package with the same name as the
# automake package, install to $(pkgpythondir), or use the
# pkgpython_PYTHON automake variable.
#
# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as
# locations to install python extension modules (shared libraries).
# Another macro is required to find the appropriate flags to compile
# extension modules.
#
# If your package is configured with a different prefix to python,
# users will have to add the install directory to the PYTHONPATH
# environment variable, or create a .pth file (see the python
# documentation for details).
#
# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will
# cause an error if the version of python installed on the system
# doesn't meet the requirement. MINIMUM-VERSION should consist of
# numbers and dots only.
AC_DEFUN([AM_PATH_PYTHON],
[
dnl Find a Python interpreter. Python versions prior to 2.0 are not
dnl supported. (2.0 was released on October 16, 2000).
m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
[python python2 python3 python3.0 python2.5 python2.4 python2.3 python2.2 dnl
python2.1 python2.0])
m4_if([$1],[],[
dnl No version check is needed.
# Find any Python interpreter.
if test -z "$PYTHON"; then
AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :)
fi
am_display_PYTHON=python
], [
dnl A version check is needed.
if test -n "$PYTHON"; then
# If the user set $PYTHON, use it and don't search something else.
AC_MSG_CHECKING([whether $PYTHON version >= $1])
AM_PYTHON_CHECK_VERSION([$PYTHON], [$1],
[AC_MSG_RESULT(yes)],
[AC_MSG_ERROR(too old)])
am_display_PYTHON=$PYTHON
else
# Otherwise, try each interpreter until we find one that satisfies
# VERSION.
AC_CACHE_CHECK([for a Python interpreter with version >= $1],
[am_cv_pathless_PYTHON],[
for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do
test "$am_cv_pathless_PYTHON" = none && break
AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break])
done])
# Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON.
if test "$am_cv_pathless_PYTHON" = none; then
PYTHON=:
else
AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON])
fi
am_display_PYTHON=$am_cv_pathless_PYTHON
fi
])
if test "$PYTHON" = :; then
dnl Run any user-specified action, or abort.
m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])])
else
dnl Query Python for its version number. Getting [:3] seems to be
dnl the best way to do this; it's what "site.py" does in the standard
dnl library.
AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
[am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`])
AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
dnl Use the values of $prefix and $exec_prefix for the corresponding
dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made
dnl distinct variables so they can be overridden if need be. However,
dnl general consensus is that you shouldn't need this ability.
AC_SUBST([PYTHON_PREFIX], ['${prefix}'])
AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}'])
dnl At times (like when building shared libraries) you may want
dnl to know which OS platform Python thinks this is.
AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
[am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`])
AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
dnl Set up 4 directories:
dnl pythondir -- where to install python scripts. This is the
dnl site-packages directory, not the python standard library
dnl directory like in previous automake betas. This behavior
dnl is more consistent with lispdir.m4 for example.
dnl Query distutils for this directory. distutils does not exist in
dnl Python 1.5, so we fall back to the hardcoded directory if it
dnl doesn't work.
AC_CACHE_CHECK([for $am_display_PYTHON script directory],
[am_cv_python_pythondir],
[if test "x$prefix" = xNONE
then
am_py_prefix=$ac_default_prefix
else
am_py_prefix=$prefix
fi
am_cv_python_pythondir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(0,0,prefix='$am_py_prefix'))" 2>/dev/null ||
echo "$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
case $am_cv_python_pythondir in
$am_py_prefix*)
am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'`
am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"`
;;
*)
case $am_py_prefix in
/usr|/System*) ;;
*)
am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages
;;
esac
;;
esac
])
AC_SUBST([pythondir], [$am_cv_python_pythondir])
dnl pkgpythondir -- $PACKAGE directory under pythondir. Was
dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is
dnl more consistent with the rest of automake.
AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE])
dnl pyexecdir -- directory for installing python extension modules
dnl (shared libraries)
dnl Query distutils for this directory. distutils does not exist in
dnl Python 1.5, so we fall back to the hardcoded directory if it
dnl doesn't work.
AC_CACHE_CHECK([for $am_display_PYTHON extension module directory],
[am_cv_python_pyexecdir],
[if test "x$exec_prefix" = xNONE
then
am_py_exec_prefix=$am_py_prefix
else
am_py_exec_prefix=$exec_prefix
fi
am_cv_python_pyexecdir=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_lib(1,0,prefix='$am_py_exec_prefix'))" 2>/dev/null ||
echo "$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages"`
case $am_cv_python_pyexecdir in
$am_py_exec_prefix*)
am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'`
am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"`
;;
*)
case $am_py_exec_prefix in
/usr|/System*) ;;
*)
am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages
;;
esac
;;
esac
])
AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir])
dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE)
AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE])
dnl Run any user-specified action.
$2
fi
])
# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE])
# ---------------------------------------------------------------------------
# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION.
# Run ACTION-IF-FALSE otherwise.
# This test uses sys.hexversion instead of the string equivalent (first
# word of sys.version), in order to cope with versions such as 2.2c1.
# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
AC_DEFUN([AM_PYTHON_CHECK_VERSION],
[prog="import sys
# split strings by '.' and convert to numeric. Append some zeros
# because we need at least 4 digits for the hex conversion.
# map returns an iterator in Python 3.0 and a list in 2.x
minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
minverhex = 0
# xrange is not present in Python 3.0 and range returns an iterator
for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
sys.exit(sys.hexversion < minverhex)"
AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
......
......@@ -378,6 +378,11 @@ PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PKG_CONFIG = @PKG_CONFIG@
PYTHON = @PYTHON@
PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
PYTHON_PLATFORM = @PYTHON_PLATFORM@
PYTHON_PREFIX = @PYTHON_PREFIX@
PYTHON_VERSION = @PYTHON_VERSION@
RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
......@@ -453,9 +458,13 @@ mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
pkgpyexecdir = @pkgpyexecdir@
pkgpythondir = @pkgpythondir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
pyexecdir = @pyexecdir@
pythondir = @pythondir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
......
......@@ -144,10 +144,10 @@ out_all:
static dbus_bool_t
clear_environment (DBusError *error)
{
const char *debug_env = NULL;
const char *starter_env = NULL;
#ifdef DBUS_ENABLE_VERBOSE_MODE
const char *debug_env = NULL;
/* are we debugging */
debug_env = _dbus_getenv ("DBUS_VERBOSE");
#endif
......@@ -184,6 +184,7 @@ clear_environment (DBusError *error)
static dbus_bool_t
check_permissions (const char *dbus_user, DBusError *error)
{
#ifndef ACTIVATION_LAUNCHER_TEST
uid_t uid, euid;
struct passwd *pw;
......@@ -191,7 +192,6 @@ check_permissions (const char *dbus_user, DBusError *error)
uid = 0;
euid = 0;
#ifndef ACTIVATION_LAUNCHER_TEST
/* bail out unless the dbus user is invoking the helper */
pw = getpwnam(dbus_user);
if (!pw)
......@@ -403,12 +403,15 @@ get_correct_parser (BusConfigParser **parser, DBusError *error)
{
DBusString config_file;
dbus_bool_t retval;
#ifdef ACTIVATION_LAUNCHER_TEST
const char *test_config_file;
#endif
retval = FALSE;
test_config_file = NULL;
#ifdef ACTIVATION_LAUNCHER_TEST
test_config_file = NULL;
/* there is no _way_ we should be setuid if this define is set.
* but we should be doubly paranoid and check... */
if (getuid() != geteuid())
......
......@@ -257,6 +257,7 @@ update_desktop_file_entry (BusActivation *activation,
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
retval = FALSE;
name = NULL;
exec = NULL;
user = NULL;
......@@ -416,8 +417,11 @@ update_desktop_file_entry (BusActivation *activation,
if (_dbus_hash_table_lookup_string (activation->entries, name))
{
_dbus_verbose ("The new service name \"%s\" of service file \"%s\" already in cache, ignoring\n",
_dbus_verbose ("The new service name \"%s\" of service file \"%s\" is already in cache, ignoring\n",
name, _dbus_string_get_const_data (&file_path));
dbus_set_error (error, DBUS_ERROR_FAILED,
"The new service name \"%s\" of service file \"%s\" is already in cache, ignoring\n",
name, _dbus_string_get_const_data (&file_path));
goto out;
}
......@@ -446,8 +450,7 @@ update_desktop_file_entry (BusActivation *activation,
* the entries hash table */
_dbus_hash_table_remove_string (entry->s_dir->entries,
entry->filename);
bus_activation_entry_unref (entry);
return FALSE;
goto out;
}
}
......@@ -465,7 +468,7 @@ out:
if (entry)
bus_activation_entry_unref (entry);
return FALSE;
return retval;
}
static dbus_bool_t
......@@ -881,8 +884,6 @@ bus_activation_new (BusContext *context,
DBusError *error)
{
BusActivation *activation;
DBusList *link;
char *dir;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
......@@ -1671,7 +1672,6 @@ bus_activation_activate_service (BusActivation *activation,
char **envp = NULL;
int argc;
dbus_bool_t retval;
DBusHashIter iter;
dbus_bool_t was_pending_activation;
DBusString command;
......@@ -2538,14 +2538,18 @@ bus_activation_service_reload_test (const DBusString *test_data_dir)
_dbus_assert_not_reached ("could not initiate service reload test");
if (!do_service_reload_test (&directory, FALSE))
; /* Do nothing? */
{
/* Do nothing? */
}
/* Do OOM tests */
if (!init_service_reload_test (&directory))
_dbus_assert_not_reached ("could not initiate service reload test");
if (!do_service_reload_test (&directory, TRUE))
; /* Do nothing? */
{
/* Do nothing? */
}
/* Cleanup test directory */
if (!cleanup_service_reload_test (&directory))
......
......@@ -481,7 +481,6 @@ process_config_every_time (BusContext *context,
DBusString full_address;
DBusList *link;
DBusList **dirs;
BusActivation *new_activation;
char *addr;
const char *servicehelper;
char *s;
......@@ -688,7 +687,6 @@ bus_context_new (const DBusString *config_file,
dbus_bool_t systemd_activation,
DBusError *error)
{
DBusString log_prefix;
BusContext *context;
BusConfigParser *parser;
......@@ -1393,9 +1391,6 @@ bus_context_check_security_policy (BusContext *context,
dbus_bool_t log;
int type;
dbus_bool_t requested_reply;
const char *sender_name;
const char *sender_loginfo;
const char *proposed_recipient_loginfo;
type = dbus_message_get_type (message);
dest = dbus_message_get_destination (message);
......@@ -1561,9 +1556,6 @@ bus_context_check_security_policy (BusContext *context,
proposed_recipient,
message, &toggles, &log))
{
const char *msg = "Rejected send message, %d matched rules; "
"type=\"%s\", sender=\"%s\" (%s) interface=\"%s\" member=\"%s\" error name=\"%s\" requested_reply=%d destination=\"%s\" (%s))";
complain_about_message (context, DBUS_ERROR_ACCESS_DENIED,
"Rejected send message", toggles,
message, sender, proposed_recipient, requested_reply,
......
......@@ -3271,11 +3271,12 @@ test_default_session_servicedirs (void)
DBusList *dirs;
DBusList *link;
DBusString progs;
const char *common_progs;
int i;
#ifdef DBUS_WIN
const char *common_progs;
char buffer[1024];
if (_dbus_get_install_root(buffer, sizeof(buffer)))
{
strcat(buffer,DBUS_DATADIR);
......@@ -3289,8 +3290,9 @@ test_default_session_servicedirs (void)
if (!_dbus_string_init (&progs))
_dbus_assert_not_reached ("OOM allocating progs");
common_progs = _dbus_getenv ("CommonProgramFiles");
#ifndef DBUS_UNIX
common_progs = _dbus_getenv ("CommonProgramFiles");
if (common_progs)
{
if (!_dbus_string_append (&progs, common_progs))
......@@ -3411,7 +3413,9 @@ test_default_system_servicedirs (void)
DBusList *dirs;
DBusList *link;
DBusString progs;
#ifndef DBUS_UNIX
const char *common_progs;
#endif
int i;
/* On Unix we don't actually use this variable, but it's easier to handle the
......@@ -3419,8 +3423,9 @@ test_default_system_servicedirs (void)
if (!_dbus_string_init (&progs))
_dbus_assert_not_reached ("OOM allocating progs");
common_progs = _dbus_getenv ("CommonProgramFiles");
#ifndef DBUS_UNIX
common_progs = _dbus_getenv ("CommonProgramFiles");
if (common_progs)
{
if (!_dbus_string_append (&progs, common_progs))
......
......@@ -403,14 +403,6 @@ free_connection_data (void *data)
dbus_free (d);
}
static void
call_timeout_callback (DBusTimeout *timeout,
void *data)
{
/* can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle (timeout);
}
BusConnections*
bus_connections_new (BusContext *context)
{
......@@ -838,12 +830,7 @@ bus_connection_get_unix_groups (DBusConnection *connection,
int *n_groups,
DBusError *error)
{
BusConnectionData *d;
unsigned long uid;
d = BUS_CONNECTION_DATA (connection);
_dbus_assert (d != NULL);
*groups = NULL;
*n_groups = 0;
......@@ -1459,13 +1446,7 @@ bus_connections_check_limits (BusConnections *connections,
DBusConnection *requesting_completion,
DBusError *error)
{
BusConnectionData *d;
unsigned long uid;
d = BUS_CONNECTION_DATA (requesting_completion);
_dbus_assert (d != NULL);
_dbus_assert (d->name == NULL);
if (connections->n_completed >=
bus_context_get_max_completed_connections (connections->context))
......
......@@ -4773,7 +4773,6 @@ bus_unix_fds_passing_test(const DBusString *test_data_dir)
DBusConnection *foo, *bar;
DBusError error;
DBusMessage *m;
dbus_bool_t b;
int one[2], two[2], x, y, z;
char r;
......
......@@ -827,7 +827,6 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
DBusMessageIter iter;
DBusMessageIter dict_iter;
DBusMessageIter dict_entry_iter;
int msg_type;
int array_type;
int key_type;
DBusList *keys, *key_link;
......@@ -842,9 +841,13 @@ bus_driver_handle_update_activation_environment (DBusConnection *connection,
/* The message signature has already been checked for us,
* so let's just assert it's right.
*/
msg_type = dbus_message_iter_get_arg_type (&iter);
#ifndef DBUS_DISABLE_ASSERT
{
int msg_type = dbus_message_iter_get_arg_type (&iter);
_dbus_assert (msg_type == DBUS_TYPE_ARRAY);
_dbus_assert (msg_type == DBUS_TYPE_ARRAY);
}
#endif
dbus_message_iter_recurse (&iter, &dict_iter);
......@@ -1930,7 +1933,7 @@ bus_driver_handle_message (DBusConnection *connection,
DBusMessage *message,
DBusError *error)
{
const char *name, *sender, *interface;
const char *name, *interface;
const InterfaceHandler *ih;
const MessageHandler *mh;
dbus_bool_t found_interface = FALSE;
......@@ -1957,13 +1960,17 @@ bus_driver_handle_message (DBusConnection *connection,
_dbus_assert (dbus_message_get_member (message) != NULL);
name = dbus_message_get_member (message);
sender = dbus_message_get_sender (message);
_dbus_verbose ("Driver got a method call: %s\n",
dbus_message_get_member (message));
_dbus_verbose ("Driver got a method call: %s\n", name);
/* security checks should have kept this from getting here */
_dbus_assert (sender != NULL || strcmp (name, "Hello") == 0);
#ifndef DBUS_DISABLE_ASSERT
{
const char *sender = dbus_message_get_sender (message);
_dbus_assert (sender != NULL || strcmp (name, "Hello") == 0);
}
#endif
for (ih = interface_handlers; ih->name != NULL; ih++)
{
......@@ -2009,7 +2016,6 @@ bus_driver_handle_message (DBusConnection *connection,
}
}
unknown:
_dbus_verbose ("No driver handler for message \"%s\"\n",
name);
......
......@@ -42,17 +42,23 @@
static BusContext *context;
#ifdef DBUS_UNIX
static int reload_pipe[2];
#define RELOAD_READ_END 0
#define RELOAD_WRITE_END 1
static void close_reload_pipe (DBusWatch **);
#ifdef DBUS_UNIX
typedef enum
{
ACTION_RELOAD = 'r',
ACTION_QUIT = 'q'
} SignalAction;
static void
signal_handler (int sig)
{
switch (sig)
{
#ifdef DBUS_BUS_ENABLE_DNOTIFY_ON_LINUX
......@@ -63,7 +69,9 @@ signal_handler (int sig)