Commit 3ec6cdd0 authored by Simon McVittie's avatar Simon McVittie

Imported Upstream version 1.5.6

parent f41d7a14
SUBDIRS=dbus bus doc tools test
DIST_SUBDIRS=dbus bus doc tools test
SUBDIRS=dbus bus tools test doc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dbus-1.pc
......
......@@ -159,6 +159,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
......@@ -196,6 +197,7 @@ GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
ADT_LIBS = @ADT_LIBS@
AMTAR = @AMTAR@
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AR = @AR@
......@@ -216,10 +218,6 @@ CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DBUS_BINDIR = @DBUS_BINDIR@
DBUS_BUS_CFLAGS = @DBUS_BUS_CFLAGS@
DBUS_BUS_LIBS = @DBUS_BUS_LIBS@
DBUS_CLIENT_CFLAGS = @DBUS_CLIENT_CFLAGS@
DBUS_CLIENT_LIBS = @DBUS_CLIENT_LIBS@
DBUS_CONSOLE_AUTH_DIR = @DBUS_CONSOLE_AUTH_DIR@
DBUS_CONSOLE_OWNER_FILE = @DBUS_CONSOLE_OWNER_FILE@
DBUS_DAEMONDIR = @DBUS_DAEMONDIR@
......@@ -231,8 +229,6 @@ DBUS_INT16_TYPE = @DBUS_INT16_TYPE@
DBUS_INT32_TYPE = @DBUS_INT32_TYPE@
DBUS_INT64_CONSTANT = @DBUS_INT64_CONSTANT@
DBUS_INT64_TYPE = @DBUS_INT64_TYPE@
DBUS_LAUNCHER_CFLAGS = @DBUS_LAUNCHER_CFLAGS@
DBUS_LAUNCHER_LIBS = @DBUS_LAUNCHER_LIBS@
DBUS_LIBEXECDIR = @DBUS_LIBEXECDIR@
DBUS_MAJOR_VERSION = @DBUS_MAJOR_VERSION@
DBUS_MICRO_VERSION = @DBUS_MICRO_VERSION@
......@@ -244,8 +240,6 @@ DBUS_SESSION_SOCKET_DIR = @DBUS_SESSION_SOCKET_DIR@
DBUS_SYSTEM_BUS_DEFAULT_ADDRESS = @DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@
DBUS_SYSTEM_PID_FILE = @DBUS_SYSTEM_PID_FILE@
DBUS_SYSTEM_SOCKET = @DBUS_SYSTEM_SOCKET@
DBUS_TEST_CFLAGS = @DBUS_TEST_CFLAGS@
DBUS_TEST_LIBS = @DBUS_TEST_LIBS@
DBUS_UINT64_CONSTANT = @DBUS_UINT64_CONSTANT@
DBUS_USER = @DBUS_USER@
DBUS_VERSION = @DBUS_VERSION@
......@@ -283,6 +277,7 @@ LAUNCHCTL = @LAUNCHCTL@
LAUNCHD_AGENT_DIR = @LAUNCHD_AGENT_DIR@
LD = @LD@
LDFLAGS = @LDFLAGS@
LIBDBUS_LIBS = @LIBDBUS_LIBS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
......@@ -299,6 +294,7 @@ MAKEINFO = @MAKEINFO@
MAN2HTML = @MAN2HTML@
MANIFEST_TOOL = @MANIFEST_TOOL@
MKDIR_P = @MKDIR_P@
NETWORK_libs = @NETWORK_libs@
NM = @NM@
NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
......@@ -318,6 +314,7 @@ RANLIB = @RANLIB@
RC = @RC@
R_DYNAMIC_LDFLAG = @R_DYNAMIC_LDFLAG@
SED = @SED@
SELINUX_LIBS = @SELINUX_LIBS@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
......@@ -334,10 +331,13 @@ TEST_SLEEP_FOREVER_BINARY = @TEST_SLEEP_FOREVER_BINARY@
TEST_SOCKET_DIR = @TEST_SOCKET_DIR@
TEST_VALID_SERVICE_DIR = @TEST_VALID_SERVICE_DIR@
TEST_VALID_SERVICE_SYSTEM_DIR = @TEST_VALID_SERVICE_SYSTEM_DIR@
THREAD_LIBS = @THREAD_LIBS@
VERSION = @VERSION@
WINDRES = @WINDRES@
XMKMF = @XMKMF@
XMLTO = @XMLTO@
XML_CFLAGS = @XML_CFLAGS@
XML_LIBS = @XML_LIBS@
XSLTPROC = @XSLTPROC@
X_CFLAGS = @X_CFLAGS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
......@@ -397,8 +397,7 @@ target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
SUBDIRS = dbus bus doc tools test
DIST_SUBDIRS = dbus bus doc tools test
SUBDIRS = dbus bus tools test doc
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dbus-1.pc
DISTCLEANFILES = \
......
D-Bus 1.5.4 (2010-06-10)
D-Bus 1.5.6 (2011-07-29)
==
The "weird, gravy-like aftertaste" release.
In addition to new features and refactoring, this release contains all of the
bugfixes from 1.4.14.
Potentially incompatible (Bustle and similar debugging tools will need
changes to work as intended):
• Do not allow match rules to "eavesdrop" (receive messages intended for a
different recipient) by mistake: eavesdroppers must now opt-in to this
behaviour by putting "eavesdrop='true'" in the match rule, which will
not have any practical effect on buses where eavesdropping is not allowed
(fd.o #37890, Cosimo Alfarano)
Other changes:
• D-Bus Specification version 0.18 (fd.o #37890, fd.o #39450, fd.o #38252;
Cosimo Alfarano, Simon McVittie)
· add the "eavesdrop" keyword to match rules
· define eavesdropping, unicast messages and broadcast messages
· stop claiming that match rules are needed to match unicast messages to you
· promote the type system to be a top-level section
• Use DBUS_ERROR_OBJECT_PATH_IN_USE if dbus_connection_try_register_object_path
or dbus_connection_try_register_fallback fails, not ...ADDRESS_IN_USE,
and simplify object-path registration (fd.o #38874, Jiří Klimeš)
• Consistently use atomic operations on everything that is ever manipulated
via atomic ops, as was done for changes to DBusConnection's refcount in
1.4.12 (fd.o #38005, Simon McVittie)
• Fix a file descriptor leak when connecting to a TCP socket (fd.o #37258,
Simon McVittie)
• Make "make check" in a clean tree work, by not running tests until
test data has been set up (fd.o #34405, Simon McVittie)
• The dbus-daemon no longer busy-loops if it has a very large number of file
descriptors (fd.o #23194, Simon McVittie)
• Refactor message flow through dispatching to avoid locking violations if
the bus daemon's message limit is hit; remove the per-connection link cache,
which was meant to improve performance, but now reduces it (fd.o #34393,
Simon McVittie)
• Some cmake fixes (Ralf Habacker)
• Remove dead code, mainly from DBusString (fd.o #38570, fd.o #39610;
Simon McVittie, Lennart Poettering)
• Stop storing two extra byte order indicators in each D-Bus message
(fd.o #38287, Simon McVittie)
• Add an optional Stats interface which can be used to get statistics from
a running dbus-daemon if enabled at configure time with --enable-stats
(fd.o #34040, Simon McVittie)
• Fix various typos (fd.o #27227, fd.o #38284; Sascha Silbe, Simon McVittie)
• Documentation (fd.o #36156, Simon McVittie):
· let xsltproc be overridden as usual: ./configure XSLTPROC=myxsltproc
· install more documentation automatically, including man2html output
· put dbus.devhelp in the right place (it must go in ${htmldir})
• Unix-specific:
· look for system services in /lib/dbus-1/system-services in addition to all
the other well-known locations; note that this should always be /lib,
even on platforms where shared libraries on the root FS would go in /lib64,
/lib/x86_64-linux-gnu or similar (fd.o #35229, Lennart Poettering)
· opt-in to fd passing on Solaris (fd.o #33465, Simon McVittie)
• Windows-specific (Ralf Habacker):
· fix use of a mutex for autolaunch server detection
· don't crash on malloc failure in _dbus_printf_string_upper_bound
D-Bus 1.5.4 (2011-06-10)
==
Security (local denial of service):
......@@ -6,7 +84,7 @@ Security (local denial of service):
• Byte-swap foreign-endian messages correctly, preventing a long-standing
local DoS if foreign-endian messages are relayed through the dbus-daemon
(backporters: this is git commit c3223ba6c401ba81df1305851312a47c485e6cd7)
(fd.o #38120, Debian #629938, no CVE number yet; Simon McVittie)
(CVE-2011-2200, fd.o #38120, Debian #629938; Simon McVittie)
New things:
......
......@@ -77,28 +77,8 @@ Configuration flags
When using autotools, run "./configure --help" to see the possible
configuration options and environment variables.
When using the cmake build system the dbus-specific configuration flags that can be given
to the cmake program are these (use -D<key>=<value> on command line)
CMAKE_BUILD_TYPE set dbus build mode - one of Debug|Release|RelWithDebInfo|MinSizeRel
DBUS_BUILD_TESTS enable unit test code default=ON
DBUS_BUILD_X11 Build with X11 autolaunch support default=ON
HAVE_CONSOLE_OWNER_FILE enable console owner file (solaris only) ) default=ON
DBUS_DISABLE_ASSERTS Disable assertion checking default=OFF
DBUS_DISABLE_CHECKS Disable public API sanity checking default=OFF
DBUS_ENABLE_ABSTRACT_SOCKETS enable support for abstract sockets (linux only) default=ON
DBUS_ENABLE_ANSI enable -ansi -pedantic gcc flags default=OFF
DBUS_ENABLE_DNOTIFY build with dnotify support (linux only) default=ON
DBUS_ENABLE_VERBOSE_MODE support verbose debug mode default=ON
DBUS_ENABLE_DOXYGEN_DOCS build DOXYGEN documentation (requires Doxygen) default=ON
DBUS_GCOV_ENABLED compile with coverage profiling instrumentation (gcc only) default=OFF
DBUS_INSTALL_SYSTEM_LIBS install required system libraries default (windows only) =OFF
DBUS_USE_EXPAT Use expat (== ON) or libxml2 (==OFF) default=ON [1]
DBUS_USE_NONCE_TCP_DEFAULT_ADDRESS Use nonce tcp default address default=OFF
DBUS_USE_OUTPUT_DEBUG_STRING enable win32 debug port for message output default=OFF
[1] requires installed development package of the related dependency
When using cmake, inspect README.cmake to see the possible
configuration options and environment variables.
API/ABI Policy
===
......@@ -160,3 +140,24 @@ Note that the high-level bindings are _separate projects_ from the
main D-Bus package, and have their own release cycles, levels of
maturity, and ABI stability policies. Please consult the documentation
for your binding.
Bootstrapping D-Bus on new platforms
===
A full build of D-Bus, with all regression tests enabled and run, has some
dependencies which themselves depend on D-Bus, either for compilation or
for some of *their* regression tests: GLib, dbus-glib and dbus-python are
currently affected.
To avoid circular dependencies, when bootstrapping D-Bus for the first time
on a new OS or CPU architecture, you can either cross-compile some of
those components, or choose the build order and options carefully:
* build and install D-Bus without tests
- do not use the --enable-modular-tests=yes configure option
- do not use the --enable-tests=yes configure option
* build and install GLib, again without tests
* use those versions of libdbus and GLib to build and install dbus-glib
* ... and use those to install dbus-python
* rebuild libdbus; this time you can run all of the tests
* rebuild GLib; this time you can run all of the tests
The cygwin dbus port is included in master branch of
dbus git repository since 1.3.1.
See cygwin/README for more informations about
See cygwin/README for more information about
the cygwin dbus port.
The cygwin port of dbus is maintained by:
......
......@@ -14,9 +14,9 @@ test not running yet and there is help needed to get them running.
Building
--------
DBus could be build on windows using automake or cmake. See the
file README for more informations.
Special cmake build instructions could be found in cmake/readme-cmake.txt
DBus can be built on windows using automake or cmake. See the
file README for more information.
Special cmake build instructions can be found in cmake/readme-cmake.txt
windbus and dbus4win Ports
......@@ -78,7 +78,7 @@ FAQ
- Do you have any clue if dbus-win32 can run in a Windows CE environment?
dbus has been ported to wince, see README.wince for more informations
dbus has been ported to wince, see README.wince for more information
- Do you know if the C++ binding made by OpenWengo will be easily portable to Windows?
......
configdir=$(sysconfdir)/dbus-1
dbus_daemon_execdir = $(DBUS_DAEMONDIR)
INCLUDES = -I$(top_srcdir) \
$(DBUS_BUS_CFLAGS) \
DBUS_BUS_LIBS = \
$(XML_LIBS) \
$(SELINUX_LIBS) \
$(THREAD_LIBS) \
$(ADT_LIBS) \
$(NETWORK_libs) \
$(NULL)
DBUS_LAUNCHER_LIBS = \
$(XML_LIBS) \
$(THREAD_LIBS) \
$(NETWORK_libs) \
$(NULL)
AM_CPPFLAGS = \
-I$(top_srcdir) \
$(XML_CFLAGS) \
-DDBUS_SYSTEM_CONFIG_FILE=\""$(configdir)/system.conf"\" \
-DDBUS_COMPILATION
-DDBUS_COMPILATION \
-DDBUS_STATIC_BUILD \
$(NULL)
# if assertions are enabled, improve backtraces
AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
EFENCE=
......@@ -73,6 +93,8 @@ BUS_SOURCES= \
services.h \
signals.c \
signals.h \
stats.c \
stats.h \
test.c \
test.h \
utils.c \
......@@ -83,14 +105,11 @@ dbus_daemon_SOURCES= \
$(BUS_SOURCES) \
main.c
dbus_daemon_CPPFLAGS = -DDBUS_STATIC_BUILD
dbus_daemon_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(EFENCE) \
$(DBUS_BUS_LIBS)
dbus_daemon_LDFLAGS=@R_DYNAMIC_LDFLAG@
LAUNCH_HELPER_SOURCES= \
$(XML_SOURCES) \
config-parser-common.c \
......@@ -110,13 +129,10 @@ dbus_daemon_launch_helper_SOURCES= \
activation-helper-bin.c \
$(LAUNCH_HELPER_SOURCES)
dbus_daemon_launch_helper_CPPFLAGS = -DDBUS_STATIC_BUILD
dbus_daemon_launch_helper_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
dbus_daemon_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
## we build another binary so we can do the launch testing without root privs.
## DO NOT INSTALL THIS FILE
dbus_daemon_launch_helper_test_SOURCES= \
......@@ -127,8 +143,8 @@ dbus_daemon_launch_helper_test_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
dbus_daemon_launch_helper_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
dbus_daemon_launch_helper_test_CPPFLAGS= -DDBUS_STATIC_BUILD \
dbus_daemon_launch_helper_test_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DACTIVATION_LAUNCHER_TEST
## we build yet another binary so we can do the OOM tests
......@@ -141,30 +157,32 @@ bus_test_launch_helper_LDADD= \
$(top_builddir)/dbus/libdbus-internal.la \
$(DBUS_LAUNCHER_LIBS)
bus_test_launch_helper_LDFLAGS=@R_DYNAMIC_LDFLAG@
bus_test_launch_helper_CPPFLAGS= -DDBUS_STATIC_BUILD \
bus_test_launch_helper_CPPFLAGS = \
$(AM_CPPFLAGS) \
-DACTIVATION_LAUNCHER_TEST \
-DACTIVATION_LAUNCHER_DO_OOM
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
noinst_PROGRAMS = $(TESTS)
noinst_PROGRAMS =
dbus_daemon_exec_PROGRAMS = dbus-daemon
if DBUS_UNIX
libexec_PROGRAMS = dbus-daemon-launch-helper
endif DBUS_UNIX
## note that TESTS has special meaning (stuff to use in make check)
## so if adding tests not to be run in make check, don't add them to
## TESTS
TESTS =
## Note that TESTS has special meaning (stuff to use in make check).
## We don't actually want to run any of these tests until test/ has been
## compiled, so we don't put them in TESTS here; we run them in test/
## instead.
if DBUS_BUILD_TESTS
TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_builddir)/test/data DBUS_TEST_HOMEDIR=$(top_builddir)/dbus DBUS_FATAL_WARNINGS=1 DBUS_BLOCK_ON_ABORT=1
TESTS += bus-test bus-test-system
## we use noinst_PROGRAMS not check_PROGRAMS so that we build
## even when not doing "make check"
# run as a test by test/Makefile.am
noinst_PROGRAMS += bus-test bus-test-system
if DBUS_UNIX
TESTS += bus-test-launch-helper
# run as a test by test/Makefile.am
noinst_PROGRAMS += bus-test-launch-helper
# this is used by the tests but is not,itself, a test
noinst_PROGRAMS += dbus-daemon-launch-helper-test
endif DBUS_UNIX
......@@ -181,17 +199,13 @@ bus_test_system_SOURCES= \
utils.h \
test-system.c
bus_test_system_CPPFLAGS = -DDBUS_STATIC_BUILD
bus_test_system_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
bus_test_system_LDFLAGS=@R_DYNAMIC_LDFLAG@
bus_test_SOURCES= \
$(BUS_SOURCES) \
test-main.c
bus_test_CPPFLAGS = -DDBUS_STATIC_BUILD
bus_test_LDADD=$(top_builddir)/dbus/libdbus-internal.la $(DBUS_BUS_LIBS)
bus_test_LDFLAGS=@R_DYNAMIC_LDFLAG@
## mop up the gcov files
clean-local:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -143,16 +143,6 @@ bus_pending_activation_entry_free (BusPendingActivationEntry *entry)
dbus_free (entry);
}
static void
handle_timeout_callback (DBusTimeout *timeout,
void *data)
{
BusPendingActivation *pending_activation = data;
while (!dbus_timeout_handle (pending_activation->timeout))
_dbus_wait_for_memory ();
}
static BusPendingActivation *
bus_pending_activation_ref (BusPendingActivation *pending_activation)
{
......@@ -179,8 +169,7 @@ bus_pending_activation_unref (BusPendingActivation *pending_activation)
if (pending_activation->timeout_added)
{
_dbus_loop_remove_timeout (bus_context_get_loop (pending_activation->activation->context),
pending_activation->timeout,
handle_timeout_callback, pending_activation);
pending_activation->timeout);
pending_activation->timeout_added = FALSE;
}
......@@ -1334,22 +1323,16 @@ handle_servicehelper_exit_error (int exit_code,
}
}
static dbus_bool_t
babysitter_watch_callback (DBusWatch *watch,
unsigned int condition,
void *data)
static void
pending_activation_finished_cb (DBusBabysitter *babysitter,
void *data)
{
BusPendingActivation *pending_activation = data;
dbus_bool_t retval;
DBusBabysitter *babysitter;
dbus_bool_t uses_servicehelper;
babysitter = pending_activation->babysitter;
_dbus_assert (babysitter == pending_activation->babysitter);
_dbus_babysitter_ref (babysitter);
retval = dbus_watch_handle (watch, condition);
/* There are two major cases here; are we the system bus or the session? Here this
* is distinguished by whether or not we use a setuid helper launcher. With the launch helper,
* some process exit codes are meaningful, processed by handle_servicehelper_exit_error.
......@@ -1360,15 +1343,7 @@ babysitter_watch_callback (DBusWatch *watch,
*/
uses_servicehelper = bus_context_get_servicehelper (pending_activation->activation->context) != NULL;
/* FIXME this is broken in the same way that
* connection watches used to be; there should be
* a separate callback for status change, instead
* of doing "if we handled a watch status might
* have changed"
*
* Fixing this lets us move dbus_watch_handle
* calls into dbus-mainloop.c
*/
/* strictly speaking this is redundant with the check in dbus-spawn now */
if (_dbus_babysitter_get_child_exited (babysitter))
{
DBusError error;
......@@ -1428,8 +1403,6 @@ babysitter_watch_callback (DBusWatch *watch,
}
_dbus_babysitter_unref (babysitter);
return retval;
}
static dbus_bool_t
......@@ -1438,9 +1411,9 @@ add_babysitter_watch (DBusWatch *watch,
{
BusPendingActivation *pending_activation = data;
return _dbus_loop_add_watch (bus_context_get_loop (pending_activation->activation->context),
watch, babysitter_watch_callback, pending_activation,
NULL);
return _dbus_loop_add_watch (
bus_context_get_loop (pending_activation->activation->context),
watch);
}
static void
......@@ -1450,7 +1423,7 @@ remove_babysitter_watch (DBusWatch *watch,
BusPendingActivation *pending_activation = data;
_dbus_loop_remove_watch (bus_context_get_loop (pending_activation->activation->context),
watch, babysitter_watch_callback, pending_activation);
watch);
}
static dbus_bool_t
......@@ -1860,10 +1833,7 @@ bus_activation_activate_service (BusActivation *activation,
}
if (!_dbus_loop_add_timeout (bus_context_get_loop (activation->context),
pending_activation->timeout,
handle_timeout_callback,
pending_activation,
NULL))
pending_activation->timeout))
{
_dbus_verbose ("Failed to add timeout for pending activation\n");
......@@ -2133,6 +2103,10 @@ bus_activation_activate_service (BusActivation *activation,
_dbus_assert (pending_activation->babysitter != NULL);
_dbus_babysitter_set_result_function (pending_activation->babysitter,
pending_activation_finished_cb,
pending_activation);
if (!_dbus_babysitter_set_watch_functions (pending_activation->babysitter,
add_babysitter_watch,
remove_babysitter_watch,
......
......@@ -102,19 +102,6 @@ server_get_context (DBusServer *server)
return context;
}
static dbus_bool_t
server_watch_callback (DBusWatch *watch,
unsigned int condition,
void *data)
{
/* FIXME this can be done in dbus-mainloop.c
* if the code in activation.c for the babysitter
* watch handler is fixed.
*/
return dbus_watch_handle (watch, condition);
}
static dbus_bool_t
add_server_watch (DBusWatch *watch,
void *data)
......@@ -124,9 +111,7 @@ add_server_watch (DBusWatch *watch,
context = server_get_context (server);
return _dbus_loop_add_watch (context->loop,
watch, server_watch_callback, server,
NULL);
return _dbus_loop_add_watch (context->loop, watch);
}
static void
......@@ -138,17 +123,7 @@ remove_server_watch (DBusWatch *watch,
context = server_get_context (server);
_dbus_loop_remove_watch (context->loop,
watch, server_watch_callback, server);
}
static void
server_timeout_callback (DBusTimeout *timeout,
void *data)
{
/* can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle (timeout);
_dbus_loop_remove_watch (context->loop, watch);
}
static dbus_bool_t
......@@ -160,8 +135,7 @@ add_server_timeout (DBusTimeout *timeout,
context = server_get_context (server);
return _dbus_loop_add_timeout (context->loop,
timeout, server_timeout_callback, server, NULL);
return _dbus_loop_add_timeout (context->loop, timeout);
}
static void
......@@ -173,8 +147,7 @@ remove_server_timeout (DBusTimeout *timeout,
context = server_get_context (server);
_dbus_loop_remove_timeout (context->loop,
timeout, server_timeout_callback, server);
_dbus_loop_remove_timeout (context->loop, timeout);
}
static void
......
......@@ -188,7 +188,7 @@ bus_config_parser_start_element (BusConfigParser *parser,
default:
{
/* we really don't care about the others... */
_dbus_verbose (" START We dont care about '%s' type '%i'\n", element_name, parser->type);
_dbus_verbose (" START We don't care about '%s' type '%i'\n", element_name, parser->type);
break;
}
}
......@@ -289,7 +289,7 @@ bus_config_parser_content (BusConfigParser *parser,
default:
{
/* we don't care about the others... really */
_dbus_verbose (" CONTENTS We dont care '%s' type '%i'\n", _dbus_string_get_const_data (&content_sane), parser->type);
_dbus_verbose (" CONTENTS We don't care about '%s' type '%i'\n", _dbus_string_get_const_data (&content_sane), parser->type);
break;
}
}
......
......@@ -3395,6 +3395,10 @@ static const char *test_system_service_dir_matches[] =
"/testusr/testshare/dbus-1/system-services",
#endif
DBUS_DATADIR"/dbus-1/system-services",
#ifdef DBUS_UNIX
"/lib/dbus-1/system-services",
#endif
#ifdef DBUS_WIN
NULL,
#endif
......
......@@ -62,6 +62,16 @@ struct BusConnections
DBusTimeout *expire_timeout; /**< Timeout for expiring incomplete connections. */
int stamp; /**< Incrementing number */
BusExpireList *pending_replies; /**< List of pending replies */
#ifdef DBUS_ENABLE_STATS
int total_match_rules;
int peak_match_rules;
int peak_match_rules_per_conn;
int total_bus_names;
int peak_bus_names;
int peak_bus_names_per_conn;
#endif
};
static dbus_int32_t connection_data_slot = -1;
......@@ -87,6 +97,11 @@ typedef struct
long connection_tv_sec; /**< Time when we connected (seconds component) */
long connection_tv_usec; /**< Time when we connected (microsec component) */
int stamp; /**< connections->stamp last time we were traversed */
#ifdef DBUS_ENABLE_STATS
int peak_match_rules;
int peak_bus_names;
#endif
} BusConnectionData;
static dbus_bool_t bus_pending_reply_expired (BusExpireList *list,
......@@ -294,31 +309,13 @@ bus_connection_disconnected (DBusConnection *connection)
dbus_connection_unref (connection);
}
static dbus_bool_t
connection_watch_callback (DBusWatch *watch,
unsigned int condition,
void *data)
{
/* FIXME this can be done in dbus-mainloop.c
* if the code in activation.c for the babysitter
* watch handler is fixed.
*/
#if 0
_dbus_verbose ("Calling handle_watch\n");
#endif
return dbus_watch_handle (watch, condition);
}
static dbus_bool_t
add_connection_watch (DBusWatch *watch,
void *data)
{
DBusConnection *connection = data;
return _dbus_loop_add_watch (connection_get_loop (connection),
watch, connection_watch_callback, connection,
NULL);
return _dbus_loop_add_watch (connection_get_loop (connection), watch);
}
static void
......@@ -327,18 +324,7 @@ remove_connection_watch (DBusWatch *watch,
{
DBusConnection *connection = data;
_dbus_loop_remove_watch (connection_get_loop (connection),
watch, connection_watch_callback, connection);
}
static void
connection_timeout_callback (DBusTimeout *timeout,
void *data)
{
/* DBusConnection *connection = data; */
/* can return FALSE on OOM but we just let it fire again later */
dbus_timeout_handle (timeout);
_dbus_loop_remove_watch (connection_get_loop (connection), watch);
}
static dbus_bool_t
......@@ -347,8 +333,7 @@ add_connection_timeout (DBusTimeout *timeout,
{
DBusConnection *connection = data;
return _dbus_loop_add_timeout (connection_get_loop (connection),
timeout, connection_timeout_callback, connection, NULL);
return _dbus_loop_add_timeout (connection_get_loop (connection), timeout);
}