platform/upstream/dbus.git
12 years agoMerge branch 'dbus-1.4'
Simon McVittie [Thu, 11 Aug 2011 10:54:52 +0000 (11:54 +0100)]
Merge branch 'dbus-1.4'

Conflicts:
NEWS

12 years agoNEWS for 1.4.x
Simon McVittie [Thu, 11 Aug 2011 10:53:45 +0000 (11:53 +0100)]
NEWS for 1.4.x

12 years agodbus-marshal-basic: assert that the size and (on gcc) alignment of all types is as...
Simon McVittie [Tue, 21 Jun 2011 16:02:10 +0000 (17:02 +0100)]
dbus-marshal-basic: assert that the size and (on gcc) alignment of all types is as expected

The __alignof__() checks here will fail if compiling for an architecture
where more-than-natural alignment is needed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39636
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agoAdd _DBUS_STATIC_ASSERT (based on GLib's G_STATIC_ASSERT) and use it
Simon McVittie [Tue, 21 Jun 2011 15:19:21 +0000 (16:19 +0100)]
Add _DBUS_STATIC_ASSERT (based on GLib's G_STATIC_ASSERT) and use it

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39636
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agoMerge branch 'dbus-1.4', omitting the DBUS_INLINE stuff
Simon McVittie [Thu, 11 Aug 2011 10:26:58 +0000 (11:26 +0100)]
Merge branch 'dbus-1.4', omitting the DBUS_INLINE stuff

fd.o #40000 had effectively already been fixed (slightly differently)
on master.

Conflicts:
cmake/config.h.cmake

12 years agocapng: Drop supplemental groups when switching to daemon user
Steve Grubb [Mon, 1 Aug 2011 18:28:27 +0000 (14:28 -0400)]
capng: Drop supplemental groups when switching to daemon user

This patch ensures the daemon process doesn't inherit any supplemental
groups for the root user from an administrator login via an init
script.

This is only an issue for pre-systemd systems.

https://bugzilla.redhat.com/show_bug.cgi?id=726953

12 years agoautogen.sh: Don't run configure if NOCONFIGURE is set
Colin Walters [Mon, 1 Aug 2011 16:59:32 +0000 (12:59 -0400)]
autogen.sh: Don't run configure if NOCONFIGURE is set

See http://people.gnome.org/~walters/docs/build-api.txt

12 years agoClean up cygwin readme
Ralf Habacker [Fri, 5 Aug 2011 22:36:42 +0000 (00:36 +0200)]
Clean up cygwin readme

12 years agoClean up cygwin readme
Ralf Habacker [Fri, 5 Aug 2011 22:36:42 +0000 (00:36 +0200)]
Clean up cygwin readme

12 years agoClean author list
Ralf Habacker [Fri, 5 Aug 2011 21:26:41 +0000 (23:26 +0200)]
Clean author list

12 years agoReduce duplicates from authors list
Ralf Habacker [Fri, 5 Aug 2011 21:52:49 +0000 (23:52 +0200)]
Reduce duplicates from authors list

Some duplicates are there by accident mostly because of the git
learning curve (as in my case). Other duplicates could be outdated
and may be candidates for additional mappings.

12 years agoReduce duplicates from authors list
Ralf Habacker [Fri, 5 Aug 2011 21:52:49 +0000 (23:52 +0200)]
Reduce duplicates from authors list

Some duplicates are there by accident mostly because of the git
learning curve (as in my case). Other duplicates could be outdated
and may be candidates for additional mappings.

12 years agoClean author list
Ralf Habacker [Fri, 5 Aug 2011 21:26:41 +0000 (23:26 +0200)]
Clean author list

12 years agoWin32 compile fix.
Ralf Habacker [Fri, 5 Aug 2011 21:01:10 +0000 (23:01 +0200)]
Win32 compile fix.

msvc compilers define 'inline' only for c++ code, so wrap it
with a platform independent DBUS_INLINE define in cmake
generated config.h.

12 years agoWin32 compile fix.
Ralf Habacker [Fri, 5 Aug 2011 20:37:06 +0000 (22:37 +0200)]
Win32 compile fix.

Do not limit ACTION_RELOAD to unix only because it is used in the
crossplattform function handle_reload_watch().

12 years agoMerge branch 'dbus-1.4' and update NEWS further
Simon McVittie [Fri, 5 Aug 2011 14:07:24 +0000 (15:07 +0100)]
Merge branch 'dbus-1.4' and update NEWS further

12 years agoNEWS
Simon McVittie [Fri, 5 Aug 2011 14:03:39 +0000 (15:03 +0100)]
NEWS

12 years agoMerge branch 'dbus-1.4'
Simon McVittie [Fri, 5 Aug 2011 13:52:37 +0000 (14:52 +0100)]
Merge branch 'dbus-1.4'

Conflicts:
bus/main.c

12 years agoAdd a regression test for fd.o #38005
Simon McVittie [Thu, 4 Aug 2011 16:16:59 +0000 (17:16 +0100)]
Add a regression test for fd.o #38005

(The dbus-1.4 version.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39836
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agorelay test: don't leak the server's address
Simon McVittie [Thu, 4 Aug 2011 12:13:24 +0000 (13:13 +0100)]
relay test: don't leak the server's address

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39836
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years ago_dbus_server_new_for_domain_socket: don't try to unlink abstract sockets
Simon McVittie [Wed, 29 Jun 2011 16:29:16 +0000 (17:29 +0100)]
_dbus_server_new_for_domain_socket: don't try to unlink abstract sockets

Our abstract socket names look like filenames (/tmp/dbus-MwozdykBNK or
whatever), so if we incorrectly unlink the abstract socket name, in
highly unlikely circumstances we could accidentally unlink a non-abstract
socket belonging to another process!

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agobus signal_handler: call _exit in the unlikely event that the pipe is full or invalid
Simon McVittie [Wed, 29 Jun 2011 15:44:33 +0000 (16:44 +0100)]
bus signal_handler: call _exit in the unlikely event that the pipe is full or invalid

On OSs with abstract sockets, this is close enough. On OSs without
abstract sockets, this results in failing to clean up Unix sockets
in /tmp if someone has sent us thousands of SIGHUP signals since we
last entered the main loop - I think that's acceptable.

The reload pipe should never get closed, but if it is for some reason,
we want a SIGTERM after that to cause an exit too.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agobus signal_handler: comment why it's OK if the reload pipe gets full
Simon McVittie [Wed, 29 Jun 2011 15:25:08 +0000 (16:25 +0100)]
bus signal_handler: comment why it's OK if the reload pipe gets full

Backported to dbus-1.4, originally part of commit c7ef3ead558e147.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336
Reviewed-by: Thiago Macieira <thiago@kde.org>
12 years agobus signal_handler: don't pretend to be portable away from Unix
Simon McVittie [Wed, 29 Jun 2011 15:20:09 +0000 (16:20 +0100)]
bus signal_handler: don't pretend to be portable away from Unix

Signals are POSIX but not ISO C, so guard it with DBUS_UNIX.

dbus-sysdeps-util-win doesn't actually implement _dbus_set_signal_handler
anyway, so not compiling this code on non-Unix seems more honest.

Backported to dbus-1.4, originally part of commit c7ef3ead558e147.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33336
Reviewed-by: Thiago Macieira <thiago@kde.org>
12 years agoConditionalize inclusion of unistd.h
Simon McVittie [Wed, 29 Jun 2011 15:17:20 +0000 (16:17 +0100)]
Conditionalize inclusion of unistd.h

Windows doesn't have it, for instance.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agoHandle SIGTERM again, to avoid leaving /tmp/dbus-XXX sockets on Solaris
Brian Cameron [Wed, 29 Jun 2011 15:15:51 +0000 (16:15 +0100)]
Handle SIGTERM again, to avoid leaving /tmp/dbus-XXX sockets on Solaris

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38656
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
12 years agoMerge branch 'dbus-1.4'
Simon McVittie [Fri, 5 Aug 2011 13:18:27 +0000 (14:18 +0100)]
Merge branch 'dbus-1.4'

12 years agocmake: always enable GNU and recent-POSIX extensions, like autoconf does
Simon McVittie [Wed, 27 Jul 2011 14:59:53 +0000 (15:59 +0100)]
cmake: always enable GNU and recent-POSIX extensions, like autoconf does

If the C library is (e)glibc, this allows use of POSIX, BSD, SVID, GNU,
etc., extensions to ISO C, regardless of using -ansi or not.

Not doing this broke the cmake build on Linux since commit 18b08180,
which added AC_USE_SYSTEM_EXTENSIONS to configure.ac (and removed
_GNU_SOURCE from files that use it) without also updating the cmake
build system. SO_PEERCRED is defined unconditionally, but struct ucred
is considered to be a GNU extension, so can't be used under _GNU_SOURCE.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29228
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years ago_dbus_lookup_session_address_launchd: don't define if not used
Simon McVittie [Thu, 14 Jul 2011 17:48:26 +0000 (18:48 +0100)]
_dbus_lookup_session_address_launchd: don't define if not used

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agomessage-factory: move static functions only called by #if 0 code into another #if 0
Simon McVittie [Thu, 14 Jul 2011 17:48:03 +0000 (18:48 +0100)]
message-factory: move static functions only called by #if 0 code into another #if 0

The comment "This is really expensive and doesn't add too much coverage"
is copied from the commented-out use of this code.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agodbus-memory: move variable only used on Windows into the conditional
Simon McVittie [Thu, 14 Jul 2011 17:47:18 +0000 (18:47 +0100)]
dbus-memory: move variable only used on Windows into the conditional

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agodbus-marshal-recursive-util: remove unused function call
Simon McVittie [Thu, 14 Jul 2011 17:46:57 +0000 (18:46 +0100)]
dbus-marshal-recursive-util: remove unused function call

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agoconfig-parser: don't try to get CommonProgramFiles from the environment on Unix
Simon McVittie [Thu, 14 Jul 2011 17:46:38 +0000 (18:46 +0100)]
config-parser: don't try to get CommonProgramFiles from the environment on Unix

It's unused on Unix, and gcc warns.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agoactivation-helper: remove unused variable from the real build
Simon McVittie [Thu, 14 Jul 2011 17:46:06 +0000 (18:46 +0100)]
activation-helper: remove unused variable from the real build

It's only used in the test build.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agoactivation-helper: check_permissions: in the test build, don't have unused variables
Simon McVittie [Thu, 14 Jul 2011 17:45:45 +0000 (18:45 +0100)]
activation-helper: check_permissions: in the test build, don't have unused variables

In the real build they're used to check permissions.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years ago_dbus_get_current_time: move struct timeval into the non-monotonic branch
Simon McVittie [Thu, 14 Jul 2011 17:45:13 +0000 (18:45 +0100)]
_dbus_get_current_time: move struct timeval into the non-monotonic branch

It's only used there.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agoRemove various never-used variables
Simon McVittie [Thu, 14 Jul 2011 17:44:46 +0000 (18:44 +0100)]
Remove various never-used variables

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agotest-service, test-shell-service: check what RequestName returned
Simon McVittie [Thu, 14 Jul 2011 17:43:04 +0000 (18:43 +0100)]
test-service, test-shell-service: check what RequestName returned

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agodbus-monitor: remove unused SIGINT handler
Simon McVittie [Thu, 14 Jul 2011 17:42:42 +0000 (18:42 +0100)]
dbus-monitor: remove unused SIGINT handler

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39231
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
12 years agocapng: Drop supplemental groups when switching to daemon user
Steve Grubb [Mon, 1 Aug 2011 18:28:27 +0000 (14:28 -0400)]
capng: Drop supplemental groups when switching to daemon user

This patch ensures the daemon process doesn't inherit any supplemental
groups for the root user from an administrator login via an init
script.

This is only an issue for pre-systemd systems.

https://bugzilla.redhat.com/show_bug.cgi?id=726953

12 years agoautogen.sh: Don't run configure if NOCONFIGURE is set
Colin Walters [Mon, 1 Aug 2011 16:59:32 +0000 (12:59 -0400)]
autogen.sh: Don't run configure if NOCONFIGURE is set

See http://people.gnome.org/~walters/docs/build-api.txt

12 years agomicro version
Simon McVittie [Fri, 29 Jul 2011 16:20:55 +0000 (17:20 +0100)]
micro version

12 years agospec v0.18 and D-Bus 1.5.6 dbus-1.5.6
Simon McVittie [Fri, 29 Jul 2011 15:46:38 +0000 (16:46 +0100)]
spec v0.18 and D-Bus 1.5.6

12 years agospec: mention that buses may have a security policy, but leave it implementation...
Simon McVittie [Thu, 21 Jul 2011 16:02:47 +0000 (17:02 +0100)]
spec: mention that buses may have a security policy, but leave it implementation-specific

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39450
Reviewed-by: Thiago Macieira <thiago@kde.org>
12 years agoMove the explanation of message routing to the Message Routing section, leaving behin...
Simon McVittie [Thu, 21 Jul 2011 15:24:01 +0000 (16:24 +0100)]
Move the explanation of message routing to the Message Routing section, leaving behind a summary

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39450
Reviewed-by: Thiago Macieira <thiago@kde.org>
12 years agoDefine eavesdropping, and document the eavesdrop match
Simon McVittie [Fri, 29 Jul 2011 15:31:48 +0000 (16:31 +0100)]
Define eavesdropping, and document the eavesdrop match

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39450
Reviewed-by: Thiago Macieira <thiago@kde.org>
12 years agospec: define unicast messages and broadcast signals, and explicitly allow unicast...
Simon McVittie [Thu, 21 Jul 2011 15:17:35 +0000 (16:17 +0100)]
spec: define unicast messages and broadcast signals, and explicitly allow unicast signals

I believe that the wording of the spec has always allowed unicast signals,
but most bindings assume that signals are broadcasts, so it seems worth
saying specifically that this feature exists and can be useful.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39450
Reviewed-by: Thiago Macieira <thiago@kde.org>
12 years agospec: make the Match Rules section true again
Simon McVittie [Thu, 21 Jul 2011 15:14:02 +0000 (16:14 +0100)]
spec: make the Match Rules section true again

The spec previously claimed that only messages matching the client's
match rules would be received. This is not actually true: messages
listing a client as their DESTINATION are always delivered (security
policy permitting).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=39450
Reviewed-by: Thiago Macieira <thiago@kde.org>
12 years agoMerge branch 'dbus-1.4'
Simon McVittie [Fri, 29 Jul 2011 15:28:32 +0000 (16:28 +0100)]
Merge branch 'dbus-1.4'

Conflicts:
NEWS
configure.ac

12 years agomicro version
Simon McVittie [Fri, 29 Jul 2011 15:17:32 +0000 (16:17 +0100)]
micro version

12 years ago1.4.14 dbus-1.4.14
Simon McVittie [Fri, 29 Jul 2011 13:28:54 +0000 (14:28 +0100)]
1.4.14

12 years agoNEWS for 1.5
Simon McVittie [Fri, 29 Jul 2011 12:43:09 +0000 (13:43 +0100)]
NEWS for 1.5

12 years agoMerge branch 'dbus-1.4'
Simon McVittie [Fri, 29 Jul 2011 11:52:32 +0000 (12:52 +0100)]
Merge branch 'dbus-1.4'

Conflicts:
NEWS

12 years agoNEWS
Simon McVittie [Fri, 29 Jul 2011 11:51:42 +0000 (12:51 +0100)]
NEWS

12 years agoImplement _dbus_atomic_get directly, rather than via inc + dec
Simon McVittie [Thu, 28 Jul 2011 15:58:05 +0000 (16:58 +0100)]
Implement _dbus_atomic_get directly, rather than via inc + dec

The Windows implementation is untested, but does at least (cross-)compile,
and matches what GLib does.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Reviewed-by: Lennart Poettering <lennart@poettering.net>
12 years agoRemove remnants of dbus-viewer
Simon McVittie [Wed, 15 Jun 2011 13:37:47 +0000 (14:37 +0100)]
Remove remnants of dbus-viewer

Parts of it were already missing, it wasn't compiled, and it depends on
dbus-glib and Gtk.

12 years agotools: use AM_CPPFLAGS, and wrap its lines
Simon McVittie [Wed, 15 Jun 2011 13:30:13 +0000 (14:30 +0100)]
tools: use AM_CPPFLAGS, and wrap its lines

12 years agotest, test/name-test: remove SOURCES where they can be inferred from the name of...
Simon McVittie [Wed, 15 Jun 2011 13:27:34 +0000 (14:27 +0100)]
test, test/name-test: remove SOURCES where they can be inferred from the name of the executable

12 years agotest/name-test: remove useless CFLAGS
Simon McVittie [Wed, 15 Jun 2011 13:25:54 +0000 (14:25 +0100)]
test/name-test: remove useless CFLAGS

12 years agotest/name-test: use AM_CPPFLAGS instead of INCLUDES
Simon McVittie [Wed, 15 Jun 2011 13:25:43 +0000 (14:25 +0100)]
test/name-test: use AM_CPPFLAGS instead of INCLUDES

12 years agodbus: use AM_CPPFLAGS
Simon McVittie [Wed, 15 Jun 2011 13:23:58 +0000 (14:23 +0100)]
dbus: use AM_CPPFLAGS

12 years agotest: promote GLIB_CFLAGS, DBUS_GLIB_CFLAGS to top level and use AM_CPPFLAGS
Simon McVittie [Wed, 15 Jun 2011 13:22:42 +0000 (14:22 +0100)]
test: promote GLIB_CFLAGS, DBUS_GLIB_CFLAGS to top level and use AM_CPPFLAGS

INCLUDES is a deprecated way to get the same effect as AM_CPPFLAGS.

It's harmless to add extra -I directories to all the tests, even those
that use neither GLib nor dbus-glib, so we can simplify by setting these
AM_CPPFLAGS for the whole directory.

12 years agotest: reverse assumption regarding static/dynamic linking
Simon McVittie [Wed, 15 Jun 2011 13:21:14 +0000 (14:21 +0100)]
test: reverse assumption regarding static/dynamic linking

If we change the default assumption to be that new tests will be
dynamically-linked to libdbus, those tests can be useful for
installcheck or even for installation. Accordingly, explicitly use
new variable $(static_cppflags) for all tests that need static linking.

12 years agobus: use AM_CPPFLAGS to simplify preprocessor invocation
Simon McVittie [Wed, 15 Jun 2011 13:14:34 +0000 (14:14 +0100)]
bus: use AM_CPPFLAGS to simplify preprocessor invocation

Everything in this directory is statically linked to libdbus-internal,
so we can make -DDBUS_STATIC_BUILD global. Also, merge INCLUDES into
AM_CPPFLAGS (it's an older name for the same functionality).

12 years agoSimplify linking for tests that use libdbus-testutils
Simon McVittie [Wed, 15 Jun 2011 10:50:33 +0000 (11:50 +0100)]
Simplify linking for tests that use libdbus-testutils

This is the library used by tests that link libdbus-internal and DBusLoop.
By linking libdbus-internal into it, we can avoid having to repeat that
dependency all over the place - libtool and cmake both know how to follow
recursive dependencies.

In cmake, also use libdbus-testutils for more tests, in preference to
repeating its source files.

12 years agoDon't explicitly link thread and network libs into various tests
Simon McVittie [Wed, 15 Jun 2011 10:41:27 +0000 (11:41 +0100)]
Don't explicitly link thread and network libs into various tests

These tests get everything they need from the public or internal API of
libdbus-internal.la, and libtool knows how to pull in libraries'
dependencies, so we don't need explicit linking.

spawn-test and break-loader don't actually need test-utils.[ch]
either.

12 years agoRename DBUS_CLIENT_LIBS to LIBDBUS_LIBS to more accurately reflect its meaning
Simon McVittie [Fri, 29 Jul 2011 10:09:02 +0000 (11:09 +0100)]
Rename DBUS_CLIENT_LIBS to LIBDBUS_LIBS to more accurately reflect its meaning

This does still need to be in configure.ac, because it's common to
dbus/Makefile.am (linking the static/shared library) and dbus-1*.pc.in
(telling static library users which additional libraries they must link).

12 years agotools: simplify linking
Simon McVittie [Wed, 15 Jun 2011 09:34:49 +0000 (10:34 +0100)]
tools: simplify linking

* dbus-send, dbus-uuidgen only need to link libdbus; libtool knows what
  extra libraries libdbus depends on
* dbus-monitor uses a Winsock header (on Windows) so it needs
  NETWORK_libs,but still doesn't need threads
* dbus-launch needs X (on Unix) but doesn't directly need threads or
  networking

12 years agotools: put bin_PROGRAMS one per line, eliminate unnecessary variable
Simon McVittie [Wed, 15 Jun 2011 09:30:13 +0000 (10:30 +0100)]
tools: put bin_PROGRAMS one per line, eliminate unnecessary variable

12 years agoMove knowledge of what the bus daemon/launcher need to link into bus/
Simon McVittie [Tue, 14 Jun 2011 16:44:35 +0000 (17:44 +0100)]
Move knowledge of what the bus daemon/launcher need to link into bus/

12 years agoSubstitute cflags/libs per-library
Simon McVittie [Tue, 14 Jun 2011 16:40:07 +0000 (17:40 +0100)]
Substitute cflags/libs per-library

This means each module can link whatever it needs to, localizing the
knowledge of which module needs which libraries into its own
Makefile.am.

12 years agoStop defining DBUS_API_SUBJECT_TO_CHANGE
Simon McVittie [Tue, 14 Jun 2011 16:20:50 +0000 (17:20 +0100)]
Stop defining DBUS_API_SUBJECT_TO_CHANGE

Seriously.

12 years agodbus: remove export_symbols_internal, it will always be empty
Simon McVittie [Tue, 14 Jun 2011 15:56:13 +0000 (16:56 +0100)]
dbus: remove export_symbols_internal, it will always be empty

The whole point of libdbus-internal.la is that it exports all its symbols.

12 years agoSimplify linking by moving -export-dynamic to AM_LDFLAGS
Simon McVittie [Wed, 15 Jun 2011 10:32:29 +0000 (11:32 +0100)]
Simplify linking by moving -export-dynamic to AM_LDFLAGS

12 years agoRemove DBUS_GLIB_CFLAGS from name-test subdirectory (not used/needed)
Simon McVittie [Tue, 14 Jun 2011 15:37:24 +0000 (16:37 +0100)]
Remove DBUS_GLIB_CFLAGS from name-test subdirectory (not used/needed)

This appears to be left over from when dbus-glib was part of dbus.

12 years agoRemove DBUS_CLIENT_CFLAGS, which is always empty
Simon McVittie [Tue, 14 Jun 2011 15:36:14 +0000 (16:36 +0100)]
Remove DBUS_CLIENT_CFLAGS, which is always empty

12 years agoRemove DBUS_TEST_CFLAGS, which is empty
Simon McVittie [Tue, 14 Jun 2011 15:35:08 +0000 (16:35 +0100)]
Remove DBUS_TEST_CFLAGS, which is empty

12 years agoRemove leftover reference to dbus-md5.[ch]
Simon McVittie [Wed, 15 Jun 2011 10:24:29 +0000 (11:24 +0100)]
Remove leftover reference to dbus-md5.[ch]

12 years agoRemove declarations for tests that no longer exist
Simon McVittie [Wed, 15 Jun 2011 10:24:16 +0000 (11:24 +0100)]
Remove declarations for tests that no longer exist

12 years agoFix compilation for removal of link cache
Simon McVittie [Fri, 29 Jul 2011 09:45:43 +0000 (10:45 +0100)]
Fix compilation for removal of link cache

12 years agoMerge branch 'dbus-1.4'
Lennart Poettering [Thu, 28 Jul 2011 19:45:35 +0000 (21:45 +0200)]
Merge branch 'dbus-1.4'

12 years agosysdeps-unix: remove some redundant assignments
Lennart Poettering [Thu, 28 Jul 2011 03:36:33 +0000 (05:36 +0200)]
sysdeps-unix: remove some redundant assignments

12 years agoMerge branch 'dbus-1.4'
Lennart Poettering [Thu, 28 Jul 2011 19:26:21 +0000 (21:26 +0200)]
Merge branch 'dbus-1.4'

12 years agoactivation: add /lib/dbus-1/system-services to the search path for services
Lennart Poettering [Fri, 11 Mar 2011 02:03:03 +0000 (03:03 +0100)]
activation: add /lib/dbus-1/system-services to the search path for services

In order to allow D-Bus usage during early boot (where /usr is not
accessible) also search for bus activation files in
/lib/dbus-1/system-services/. This is only a first step in the right
direction, before we really can boot without /usr we'd need to move all
current activation files (or possibly replace
/usr/dbus-1/system-services to a symlink to
/lib/dbus-1/system-services).

12 years ago_dbus_message_remove_counter: remove ability to return the link
Simon McVittie [Fri, 29 Apr 2011 15:01:59 +0000 (16:01 +0100)]
_dbus_message_remove_counter: remove ability to return the link

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agoAdd a regression test that can reproduce fd.o #34393
Simon McVittie [Fri, 11 Mar 2011 13:24:08 +0000 (13:24 +0000)]
Add a regression test that can reproduce fd.o #34393

The number of messages is arbitrary; the more messages, the more likely
the crash is. 2000 messages seem to cause it reliably on this laptop,
but I've set it to 10000 to be safe.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agoRemove the per-connection link cache
Simon McVittie [Fri, 29 Apr 2011 14:08:53 +0000 (15:08 +0100)]
Remove the per-connection link cache

With fd.o#34393 fixed, retaking the lock to cache unused links
significantly adds to locking overhead (-18% throughput in a synthetic
benchmark on an ARM device). The cache is also unlimited in size, and
probably contributes to memory growth and fragmentation by not being
under the system malloc's control.

Fixing fd.o #34393, but also dropping this cache entirely, turns out to
lead to a 5% increase in throughput on the same synthetic benchmark.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agodbus_connection_dispatch: avoid freeing UnknownMethod reply until we unlock
Simon McVittie [Fri, 25 Feb 2011 18:11:51 +0000 (18:11 +0000)]
dbus_connection_dispatch: avoid freeing UnknownMethod reply until we unlock

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years ago_dbus_connection_peer_filter_unlocked_no_update: delay freeing reply
Simon McVittie [Fri, 25 Feb 2011 18:10:59 +0000 (18:10 +0000)]
_dbus_connection_peer_filter_unlocked_no_update: delay freeing reply

Finalizing the reply could conceivably call callbacks, so wait til we
unlock.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agoDon't finalize sent or dispatched messages while under the connection lock
Simon McVittie [Fri, 25 Feb 2011 17:46:54 +0000 (17:46 +0000)]
Don't finalize sent or dispatched messages while under the connection lock

Finalizing a message can trigger callbacks; that's bad, if we have a
connection locked.

In particular, if a message is received by the "left side", passed to
the "right side" and sent (as in test/relay.c (see the diagram there)
or in dbus-daemon), then finalizing that message could result in the
live messages counter for the left side, and the outgoing messages counter
for the right side, both being decremented while under either side's
lock.

After a message is dispatched on the left side, finalizing it now drops
the lock temporarily, to avoid this problem.

After a message is sent on the right side, finalizing it is now deferred
until the right side unlocks, by moving it to a new queue of
"expired messages" which is automatically cleared every time we release
the lock.

The "live messages" counter for the "left" connection will now explicitly
take the left connection's lock before decrementing, to avoid
manipulating watches without a lock.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agoDon't inline the contents of _dbus_connection_unlock
Simon McVittie [Fri, 25 Feb 2011 17:32:38 +0000 (17:32 +0000)]
Don't inline the contents of _dbus_connection_unlock

It's about to become more complex, to handle delayed deallocation of
messages in order to avoid triggering callbacks while locked.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agoWhen attaching counters to messages, don't automatically notify callbacks
Simon McVittie [Fri, 25 Feb 2011 17:21:44 +0000 (17:21 +0000)]
When attaching counters to messages, don't automatically notify callbacks

In all the places where counters are added, we're under a lock. The caller
knows what effect adding the counter might have, and can replicate it
in a lock-safe way if necessary.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agoComment some places where it's OK to unref a message despite holding locks
Simon McVittie [Fri, 25 Feb 2011 17:08:59 +0000 (17:08 +0000)]
Comment some places where it's OK to unref a message despite holding locks

In general, dbus_message_unref should be avoided while holding locks,
because it can invoke arbitrary user callbacks (via attached data, or
via DBusCounter).

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agoAdd _dbus_counter_notify and call it after every adjustment
Simon McVittie [Wed, 23 Feb 2011 12:45:53 +0000 (12:45 +0000)]
Add _dbus_counter_notify and call it after every adjustment

When fd-passing is implemented, adjustments happen in pairs; in that case
we coalesce the two calls into one.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years ago_dbus_connection_message_sent: rename to _unlocked
Simon McVittie [Tue, 22 Feb 2011 18:50:02 +0000 (18:50 +0000)]
_dbus_connection_message_sent: rename to _unlocked

It's called with the connection's lock held.

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agodbus_bus_register: don't unref the messages with the lock held
Simon McVittie [Tue, 22 Feb 2011 18:49:29 +0000 (18:49 +0000)]
dbus_bus_register: don't unref the messages with the lock held

Finalizing a message can call out to user code via dbus_message_set_data
(or to internal code not expecting locks to be held, via DBusCounter).

Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34393

12 years agoMerge branch 'dbus-1.4'
Simon McVittie [Thu, 28 Jul 2011 15:24:11 +0000 (16:24 +0100)]
Merge branch 'dbus-1.4'

12 years agoAdd a note about bootstrapping new platforms to README
Simon McVittie [Thu, 28 Jul 2011 15:23:19 +0000 (16:23 +0100)]
Add a note about bootstrapping new platforms to README

12 years agoUpgrade the type system into its own top-level section of the spec
Simon McVittie [Tue, 26 Apr 2011 16:37:21 +0000 (17:37 +0100)]
Upgrade the type system into its own top-level section of the spec

The type system can be used independently, for instance in GVariant
(although GVariant's binary encoding is in fact not the same).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38252
Reviewed-by: Lennart Poettering <lennart@poettering.net>
12 years agoMerge branch 'dbus-1.4'
Simon McVittie [Thu, 28 Jul 2011 10:32:46 +0000 (11:32 +0100)]
Merge branch 'dbus-1.4'