platform/upstream/dbus.git
13 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>
13 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

13 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).

13 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

13 years agoman pages: replace all unescaped hyphen/minus characters with \-
Simon McVittie [Tue, 14 Jun 2011 09:10:24 +0000 (10:10 +0100)]
man pages: replace all unescaped hyphen/minus characters with \-

In a man page, "-" officially means a typographical (Unicode) hyphen,
which frequently breaks the ability to copy and paste code examples from
a man page. "\-" means the ASCII hyphen/minus character. See
<http://lintian.debian.org/tags/hyphen-used-as-minus-sign.html> for
more details.

Rather than trying to distinguish between hyphens, em-dashes and
hyphen/minus, I just replaced all ambiguous hyphens with \- by applying
this vim command repeatedly until it didn't find anything:

     %s/\(^\|[^\\]\)-/\1\\-/g

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38284
Reviewed-by: Lennart Poettering <lennart@poettering.net>
13 years agoFix spelling/grammatical mistakes detected by Debian's lintian(1)
Simon McVittie [Fri, 10 Jun 2011 15:45:34 +0000 (16:45 +0100)]
Fix spelling/grammatical mistakes detected by Debian's lintian(1)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38284
Reviewed-by: Lennart Poettering <lennart@poettering.net>
13 years agolist_allows_user: fix debug output for groups
Sascha Silbe [Sun, 17 Oct 2010 12:38:20 +0000 (14:38 +0200)]
list_allows_user: fix debug output for groups

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
13 years agoNEWS
Simon McVittie [Tue, 26 Jul 2011 16:59:23 +0000 (17:59 +0100)]
NEWS

13 years agoDBusMessage: always access refcount atomically, even for assertions/initial ref
Simon McVittie [Thu, 14 Jul 2011 16:20:21 +0000 (17:20 +0100)]
DBusMessage: always access refcount atomically, even for assertions/initial ref

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years agodbus-memory: use atomic accesses to block count, even for assertions
Simon McVittie [Thu, 14 Jul 2011 16:26:52 +0000 (17:26 +0100)]
dbus-memory: use atomic accesses to block count, even for assertions

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years agoNEWS
Simon McVittie [Tue, 26 Jul 2011 10:51:04 +0000 (11:51 +0100)]
NEWS

13 years agoDBusConnection: use atomic accesses to refcount in assertions/initial ref
Simon McVittie [Thu, 14 Jul 2011 16:23:21 +0000 (17:23 +0100)]
DBusConnection: use atomic accesses to refcount in assertions/initial ref

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years agodbus_message_ref: avoid unused variable if not asserting
Simon McVittie [Thu, 14 Jul 2011 16:14:29 +0000 (17:14 +0100)]
dbus_message_ref: avoid unused variable if not asserting

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years ago_dbus_connection_close_if_only_one_ref: use _dbus_atomic_get
Simon McVittie [Thu, 14 Jul 2011 16:14:06 +0000 (17:14 +0100)]
_dbus_connection_close_if_only_one_ref: use _dbus_atomic_get

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years agoAdd _dbus_atomic_get implemented in terms of inc, dec
Simon McVittie [Thu, 14 Jul 2011 16:07:08 +0000 (17:07 +0100)]
Add _dbus_atomic_get implemented in terms of inc, dec

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years agoDBusObjectTree: always access refcount atomically
Simon McVittie [Thu, 23 Jun 2011 12:39:00 +0000 (13:39 +0100)]
DBusObjectTree: always access refcount atomically

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years agodbus_message_unref: make an assertion more strict
Simon McVittie [Thu, 23 Jun 2011 12:38:31 +0000 (13:38 +0100)]
dbus_message_unref: make an assertion more strict

We've just decremented the refcount, so it should have been at least 1
before we did that.

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years agoDBusMessageFilter: exclusively use atomic accesses to refcount
Simon McVittie [Thu, 23 Jun 2011 12:35:55 +0000 (13:35 +0100)]
DBusMessageFilter: exclusively use atomic accesses to refcount

Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005

13 years agoNEWS
Simon McVittie [Mon, 18 Jul 2011 18:33:00 +0000 (19:33 +0100)]
NEWS

13 years agoUninstall the installed docs
Simon McVittie [Tue, 12 Apr 2011 12:17:30 +0000 (13:17 +0100)]
Uninstall the installed docs

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoInstall man2html output to $(htmldir)
Simon McVittie [Tue, 12 Apr 2011 12:08:22 +0000 (13:08 +0100)]
Install man2html output to $(htmldir)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoInstall diagram.*, system-activation.txt to the $(docdir)
Simon McVittie [Tue, 12 Apr 2011 12:06:25 +0000 (13:06 +0100)]
Install diagram.*, system-activation.txt to the $(docdir)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoInstall xmlto output to $(htmldir) automatically
Simon McVittie [Tue, 12 Apr 2011 12:01:44 +0000 (13:01 +0100)]
Install xmlto output to $(htmldir) automatically

Also rename HTML_FILES to XMLTO_OUTPUT, as a more self-describing name:
we have other HTML files which are not the output from xmlto.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoInstall dbus.devhelp to $(htmldir), not $(apidir), and remove it in clean
Simon McVittie [Tue, 12 Apr 2011 11:54:22 +0000 (12:54 +0100)]
Install dbus.devhelp to $(htmldir), not $(apidir), and remove it in clean

It needs to be in $(htmldir) so that its relative paths will work.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoconfigure.ac: fix check for xsltproc
Simon McVittie [Tue, 12 Apr 2011 11:52:30 +0000 (12:52 +0100)]
configure.ac: fix check for xsltproc

Pre-setting XSLTPROC interferes with AC_CHECK_PROGS letting the user
override choice of program via the environment.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=36156

13 years agoUse EXEEXT when running tests from another directory, and skip bus-test-launch-helper...
Simon McVittie [Wed, 15 Jun 2011 11:43:15 +0000 (12:43 +0100)]
Use EXEEXT when running tests from another directory, and skip bus-test-launch-helper on non-Unix

This is necessary when cross-compiling from Linux to mingw32 and running
the resulting tests under Wine. (This partially works! Some tests fail,
though.)

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoBuild docs after running tests, and remove redundant DIST_SUBDIRS
Simon McVittie [Mon, 6 Jun 2011 15:12:05 +0000 (16:12 +0100)]
Build docs after running tests, and remove redundant DIST_SUBDIRS

If DIST_SUBDIRS isn't set, it defaults to SUBDIRS, so it's just noise.

Running tests before building documentation is an easy way to speed up the
hack/make check/fix cycle, by not wasting time rebuilding the
documentation (which is often slow) until all the tests compile and pass.

https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoRun bus tests from test/
Simon McVittie [Mon, 13 Jun 2011 10:11:31 +0000 (11:11 +0100)]
Run bus tests from test/

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoRun dbus-test from test/, not dbus/
Simon McVittie [Mon, 13 Jun 2011 10:08:28 +0000 (11:08 +0100)]
Run dbus-test from test/, not dbus/

This avoids failures caused by test/data not having been set up yet.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agodbus tests: don't warn on skipped tests
Simon McVittie [Mon, 6 Jun 2011 14:57:45 +0000 (15:57 +0100)]
dbus tests: don't warn on skipped tests

We should treat _dbus_warn as fatal when we run tests, like bus/ does.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agotest/Makefile.am: list tests one per line
Simon McVittie [Mon, 6 Jun 2011 14:01:52 +0000 (15:01 +0100)]
test/Makefile.am: list tests one per line

This improves clarity, and makes conflicts less likely and merges more
obviously correct.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34405
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoOpt-in to modern OS features on Solaris, to get file descriptor passing
Simon McVittie [Wed, 26 Jan 2011 18:24:03 +0000 (18:24 +0000)]
Opt-in to modern OS features on Solaris, to get file descriptor passing

Surely it's broken to define SCM_RIGHTS but not the necessary structs to
do something useful with it, but whatever.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33465
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years ago_dbus_connect_tcp_socket_with_nonce: don't create an extra fd (which is then leaked)
Simon McVittie [Wed, 22 Jun 2011 10:59:32 +0000 (11:59 +0100)]
_dbus_connect_tcp_socket_with_nonce: don't create an extra fd (which is then leaked)

This block should have been deleted in 2007, when IPv6 support was added:
previously, the fd allocated at the beginning of the function was used
for connect(), but for IPv6 support, the socket() call has to be inside
the loop over getaddrinfo() results so its address family can be changed.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37258
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agoDBusServer: exclusively use atomic operations on the refcount
Simon McVittie [Thu, 23 Jun 2011 12:22:44 +0000 (13:22 +0100)]
DBusServer: exclusively use atomic operations on the refcount

Same reasoning as for fd.o #38005, commit 50732523a7.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Bug-NB: NB#263436

13 years agoDBusPendingCall: exclusively use atomic operations on the refcount
Simon McVittie [Thu, 23 Jun 2011 12:08:14 +0000 (13:08 +0100)]
DBusPendingCall: exclusively use atomic operations on the refcount

Same reasoning as for fd.o #38005, commit 50732523a7.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Bug-NB: NB#263436

13 years agoCope with platforms whose vsnprintf violates both POSIX and C99 - part 1
Simon McVittie [Sun, 3 Jul 2011 04:47:39 +0000 (06:47 +0200)]
Cope with platforms whose vsnprintf violates both POSIX and C99 - part 1

13 years agoIn Windows _dbus_printf_string_upper_bound, don't crash on malloc failure
Simon McVittie [Tue, 21 Jun 2011 13:09:52 +0000 (14:09 +0100)]
In Windows _dbus_printf_string_upper_bound, don't crash on malloc failure

13 years agoAdded DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools.
Ralf Habacker [Fri, 1 Jul 2011 22:50:39 +0000 (00:50 +0200)]
Added DBUS_ENABLE_STATS option to cmake buildsystem to keep in sync with autotools.

13 years agoVisual Studio Professional uses a different ide starter - pointed out by Romain Pokrzywka
Ralf Habacker [Fri, 8 Jul 2011 08:53:20 +0000 (10:53 +0200)]
Visual Studio Professional uses a different ide starter - pointed out by Romain Pokrzywka

13 years agoCollected cmake doc into README.cmake.
Ralf Habacker [Sat, 2 Jul 2011 19:02:46 +0000 (21:02 +0200)]
Collected cmake doc into README.cmake.

13 years agowin32 fix: Keep server autolaunch mutex settings according to client detection algori...
Ralf Habacker [Fri, 1 Jul 2011 14:28:19 +0000 (16:28 +0200)]
win32 fix: Keep server autolaunch mutex settings according to client detection algorithmus.

13 years agoDBusConnection: use DBUS_ERROR_OBJECT_PATH_IN_USE instead of DBUS_ERROR_ADDRESS_IN_USE
Jiří Klimeš [Fri, 1 Jul 2011 10:58:11 +0000 (12:58 +0200)]
DBusConnection: use DBUS_ERROR_OBJECT_PATH_IN_USE instead of DBUS_ERROR_ADDRESS_IN_USE

While registering an object path the possible error is
DBUS_ERROR_OBJECT_PATH_IN_USE, not DBUS_ERROR_ADDRESS_IN_USE (the error
is set by _dbus_object_tree_register()).

Signed-off-by: Jiří Klimeš <jklimes@redhat.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38874

13 years agoversion bump
Simon McVittie [Fri, 10 Jun 2011 21:45:46 +0000 (22:45 +0100)]
version bump

13 years agoprepare 1.4.12 dbus-1.4.12
Simon McVittie [Fri, 10 Jun 2011 20:56:16 +0000 (21:56 +0100)]
prepare 1.4.12

13 years agofix installable tests to not install if unwanted
Simon McVittie [Fri, 10 Jun 2011 20:52:39 +0000 (21:52 +0100)]
fix installable tests to not install if unwanted

13 years agoNEWS
Simon McVittie [Fri, 10 Jun 2011 17:52:01 +0000 (18:52 +0100)]
NEWS

13 years agoFix copyright dates
Simon McVittie [Fri, 10 Jun 2011 17:23:52 +0000 (18:23 +0100)]
Fix copyright dates

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoUse DBUS_TIMEOUT_INFINITE in dbus-daemon.c
Simon McVittie [Fri, 10 Jun 2011 16:41:04 +0000 (17:41 +0100)]
Use DBUS_TIMEOUT_INFINITE in dbus-daemon.c

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoAdd and use DBUS_TIMEOUT_INFINITE and DBUS_TIMEOUT_USE_DEFAULT
Simon McVittie [Fri, 10 Jun 2011 16:38:14 +0000 (17:38 +0100)]
Add and use DBUS_TIMEOUT_INFINITE and DBUS_TIMEOUT_USE_DEFAULT

The documentation claimed that INT_MAX (whatever that means) meant the
default, but the value that has actually always been checked for is
0x7fffffff (aka INT32_MAX on the competent platforms we sadly don't
restrict our portability to), so we should use that. (In practice D-Bus
probably never worked on platforms where int wasn't 32 bits, though.)

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoTest that a message with the byte order mangled causes disconnection but no crash
Simon McVittie [Thu, 9 Jun 2011 16:43:34 +0000 (17:43 +0100)]
Test that a message with the byte order mangled causes disconnection but no crash

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120

13 years agomarshal test: test dbus_message_demarshal_bytes_needed
Simon McVittie [Thu, 9 Jun 2011 17:36:05 +0000 (18:36 +0100)]
marshal test: test dbus_message_demarshal_bytes_needed

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120

13 years agoAdd a test for marshalling and endian-swapping
Simon McVittie [Thu, 9 Jun 2011 17:47:04 +0000 (18:47 +0100)]
Add a test for marshalling and endian-swapping

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120

13 years agoinstallcheck: don't run installed tests against installed library if in a DESTDIR
Simon McVittie [Wed, 8 Jun 2011 17:47:14 +0000 (18:47 +0100)]
installcheck: don't run installed tests against installed library if in a DESTDIR

That probably won't work, because it'll find the system-wide library
which might be older.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoAlter test-dbus-daemon so it tests the installed dbus-daemon by default
Simon McVittie [Wed, 8 Jun 2011 17:15:05 +0000 (18:15 +0100)]
Alter test-dbus-daemon so it tests the installed dbus-daemon by default

For installcheck, adjust it to use things from DESTDIR.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoAdd support for installing most of the modular tests
Simon McVittie [Wed, 8 Jun 2011 16:39:41 +0000 (17:39 +0100)]
Add support for installing most of the modular tests

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agonew test for being disconnected by a corrupt message stream
Simon McVittie [Fri, 15 Apr 2011 12:32:48 +0000 (13:32 +0100)]
new test for being disconnected by a corrupt message stream

This was meant to reproduce fd.o #15578, but doesn't; the cause of that
bug isn't this simple.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agomodular tests: depend on GIO 2.22 for GSocket
Simon McVittie [Fri, 15 Apr 2011 12:31:33 +0000 (13:31 +0100)]
modular tests: depend on GIO 2.22 for GSocket

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoTest nonce-tcp transport
Simon McVittie [Tue, 22 Feb 2011 13:43:18 +0000 (13:43 +0000)]
Test nonce-tcp transport

Regression test for https://bugs.freedesktop.org/show_bug.cgi?id=34569

Reviewed-by: David Zeuthen <davidz@redhat.com>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agodbus-daemon test: sanity-check the just-installed config file when using DESTDIR
Simon McVittie [Mon, 21 Mar 2011 18:40:16 +0000 (18:40 +0000)]
dbus-daemon test: sanity-check the just-installed config file when using DESTDIR

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoAdd a simple integration test for dbus-daemon
Simon McVittie [Fri, 11 Mar 2011 13:13:17 +0000 (13:13 +0000)]
Add a simple integration test for dbus-daemon

This just pushes 2000 messages (or 100000 in performance-testing mode)
through the dbus-daemon, to an echo service and back.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoRun integration tests on the installed dbus binaries during installcheck
Simon McVittie [Fri, 11 Mar 2011 13:11:30 +0000 (13:11 +0000)]
Run integration tests on the installed dbus binaries during installcheck

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoGive the tests DBUS_TEST_DAEMON and DBUS_TEST_DATA in their environment
Simon McVittie [Fri, 11 Mar 2011 12:45:08 +0000 (12:45 +0000)]
Give the tests DBUS_TEST_DAEMON and DBUS_TEST_DATA in their environment

This will allow modular tests to spawn a dbus-daemon with a specified
config file; nothing uses this just yet.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoAttempt to reproduce fd.o #34393 via another regression test
Simon McVittie [Tue, 22 Feb 2011 16:32:14 +0000 (16:32 +0000)]
Attempt to reproduce fd.o #34393 via another regression test

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoloopback test: unref messages after use
Simon McVittie [Tue, 22 Feb 2011 16:31:02 +0000 (16:31 +0000)]
loopback test: unref messages after use

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoAdd an end-to-end sanity check for TCP and Unix DBusServer/DBusConnection
Simon McVittie [Tue, 22 Feb 2011 13:04:18 +0000 (13:04 +0000)]
Add an end-to-end sanity check for TCP and Unix DBusServer/DBusConnection

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoAdd support for building "modular" tests, which require GLib and dbus-glib
Simon McVittie [Tue, 22 Feb 2011 11:43:11 +0000 (11:43 +0000)]
Add support for building "modular" tests, which require GLib and dbus-glib

For the moment, the CMake build system only knows about the existing
"embedded tests"; make it define both symbols, though.

We use GLib because it has GTester (and life's too short to write yet another
JUnit clone), and dbus-glib for the main-loop integration only (see
fd.o #31515 for thoughts on incorporating just those two functions in a
separate library in the dbus tarball).

I'm not using DBusLoop for the main loop because I specifically don't
want to use non-public API or ABI of libdbus in the modular tests. If we make
sure they work against a shared libdbus, we can use them to test the
installed system, with "make installcheck".

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agoDon't disable GLib assertions when disabling our own assertions
Simon McVittie [Tue, 22 Feb 2011 11:39:23 +0000 (11:39 +0000)]
Don't disable GLib assertions when disabling our own assertions

We no longer use GLib internally, and assertions are how it'll report test
failures when we add GTest-based tests.

Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=34570

13 years agodbus_message_demarshal_bytes_needed: correct a wrong assertion
Simon McVittie [Thu, 9 Jun 2011 17:35:43 +0000 (18:35 +0100)]
dbus_message_demarshal_bytes_needed: correct a wrong assertion

It's entirely possible for a message to indicate how many bytes we need,
without actually being complete.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years ago_dbus_header_byteswap: change the first byte of the message, not just the struct...
Simon McVittie [Thu, 9 Jun 2011 16:52:10 +0000 (17:52 +0100)]
_dbus_header_byteswap: change the first byte of the message, not just the struct member

This has been wrong approximately forever, for instance see:
http://lists.freedesktop.org/archives/dbus/2007-March/007357.html

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38120
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=629938
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoConsistently use atomic operations for all access to DBusConnection refcount
Simon McVittie [Fri, 10 Jun 2011 17:08:11 +0000 (18:08 +0100)]
Consistently use atomic operations for all access to DBusConnection refcount

Trying to mix atomic operations with locked non-atomic operations is
broken: the atomic ops aren't necessarily atomic with respect to the
locked non-atomic ops, and the non-atomic ops aren't protected by the
lock because the atomic ops can change the refcount behind their back.

In theory we could use the connection lock if atomic ops aren't supported
(making a per-connection lock cheaper than the global lock used to
implement atomic ops) *and* our mutexes are recursive (making it safe
against deadlocks)... but life's too short.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38005
Tested-by: Will Manley <freedesktop williammanley net>
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoNEWS
Simon McVittie [Wed, 8 Jun 2011 10:35:22 +0000 (11:35 +0100)]
NEWS

13 years agobus: use ln -fs to enable dbus in systemd, not $(LN_S)
Simon McVittie [Tue, 7 Jun 2011 13:01:39 +0000 (14:01 +0100)]
bus: use ln -fs to enable dbus in systemd, not $(LN_S)

Using $(LN_S) is inappropriate because it could in theory mean either
ln -s, ln or cp -p depending on autoconf checks.

Not using -f breaks reinstallation directly from source (DESTDIR unset),
because the symlinks will already exist.

Because systemd isn't currently portable to non-Linux, let alone
non-SUS-compliant systems, it seems safe to assume that ln -fs behaves
as specified by SUS if systemd was found.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37870
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoNEWS
Simon McVittie [Tue, 7 Jun 2011 13:36:15 +0000 (14:36 +0100)]
NEWS

13 years agoRemove support for -Wl,--gc-sections altogether
Simon McVittie [Mon, 6 Jun 2011 08:59:37 +0000 (09:59 +0100)]
Remove support for -Wl,--gc-sections altogether

Packagers should only enable this flag if they have confirmed that it
actually works on their toolchain (it's the sort of rarely used feature
that frequently regresses on obscure architectures/OSs without anyone
noticing), and also confirmed that it is actually a significant size win
for their configuration.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33466
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agodon't try to build dbus-daemon-launch-helper for Windows
Mark Brand [Wed, 1 Jun 2011 21:51:21 +0000 (23:51 +0200)]
don't try to build dbus-daemon-launch-helper for Windows

Fixed regression in b0acded which breaks build for Windows.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37838
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
13 years agoUse #!/bin/sh for run-with-tmp-session-bus.sh
Simon McVittie [Wed, 1 Jun 2011 17:36:16 +0000 (18:36 +0100)]
Use #!/bin/sh for run-with-tmp-session-bus.sh

It doesn't seem to have any bashisms, and bash isn't in /bin on *BSD.

Suggested by Timothy Redaelli.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35880

13 years agoadd a release name here too
Simon McVittie [Wed, 1 Jun 2011 16:04:27 +0000 (17:04 +0100)]
add a release name here too

13 years agoDevelopment version
Simon McVittie [Wed, 1 Jun 2011 11:16:53 +0000 (12:16 +0100)]
Development version

13 years agoPrepare version 1.4.10 dbus-1.4.10
Simon McVittie [Wed, 1 Jun 2011 11:01:58 +0000 (12:01 +0100)]
Prepare version 1.4.10

13 years agoNEWS
Simon McVittie [Wed, 25 May 2011 17:17:53 +0000 (18:17 +0100)]
NEWS

13 years agobus_context_log: divert messages to stderr if we're not using syslog
Simon McVittie [Wed, 16 Mar 2011 14:52:39 +0000 (14:52 +0000)]
bus_context_log: divert messages to stderr if we're not using syslog

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoprocess_config_first_time_only: initialize syslog as intended.
Simon McVittie [Tue, 15 Mar 2011 15:42:56 +0000 (15:42 +0000)]
process_config_first_time_only: initialize syslog as intended.

On Linux, we previously called openlog() (with different options!) while
initializing SELinux; leave SELinux messages as LOG_USER|LOG_INFO in case
anyone was relying on that, but let the rest of our log messages come
out as LOG_DAEMON.

Also enable LOG_PERROR (copy syslog messages to stderr) unconditionally;
we can make this an autoconf check if anyone's pet Unix doesn't have
LOG_PERROR.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
13 years ago_dbus_init_system_log: remove FIXME on Windows
Simon McVittie [Tue, 15 Mar 2011 15:32:02 +0000 (15:32 +0000)]
_dbus_init_system_log: remove FIXME on Windows

We don't need any initialization here, so there's nothing to fix.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agobus_context_check_security_policy: syslog if we hit the outgoing quota
Simon McVittie [Tue, 15 Mar 2011 14:16:18 +0000 (14:16 +0000)]
bus_context_check_security_policy: syslog if we hit the outgoing quota

In practice, nothing copes with missing broadcast signals, so the least
we can do is make the failure mode visible.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agobus_context_check_security_policy: for SELinux denials, share code to set errors
Simon McVittie [Tue, 15 Mar 2011 14:02:06 +0000 (14:02 +0000)]
bus_context_check_security_policy: for SELinux denials, share code to set errors

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agobus_context_check_security_policy: factor out complain_about_message
Simon McVittie [Tue, 15 Mar 2011 13:05:23 +0000 (13:05 +0000)]
bus_context_check_security_policy: factor out complain_about_message

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35358
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoCheck for X even if X11 autolaunching is disabled
Simon McVittie [Fri, 25 Feb 2011 12:49:54 +0000 (12:49 +0000)]
Check for X even if X11 autolaunching is disabled

DBUS_ENABLE_X11_AUTOLAUNCH obviously requires DBUS_BUILD_X11. However,
the converse is not true.

If DBUS_BUILD_X11 is defined, dbus-launch will be able to connect to
the X server to determine when the session ends; most distributors will
want this, but it can be disabled with the standard Autoconf option
--without-x.

If DBUS_ENABLE_X11_AUTOLAUNCH is *also* defined, dbus-launch and libdbus
will be willing to perform autolaunch. Again, most distributors will want
this, but it can be disabled with --disable-x11-autolaunch.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agotest-autolaunch: don't expect autolaunching to work if X11 is disabled
Simon McVittie [Fri, 25 Feb 2011 12:34:38 +0000 (12:34 +0000)]
test-autolaunch: don't expect autolaunching to work if X11 is disabled

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoNEWS
Simon McVittie [Wed, 25 May 2011 16:00:07 +0000 (17:00 +0100)]
NEWS

13 years agoWhen checking for __sync_sub_and_fetch, don't underquote, to shut up recent autoconf
Simon McVittie [Mon, 9 May 2011 17:49:54 +0000 (18:49 +0100)]
When checking for __sync_sub_and_fetch, don't underquote, to shut up recent autoconf

Without the correct number of levels of quoting, autoconf mistakenly
believes we didn't use AC_LANG_SOURCE where required. (In fact,
AC_LANG_PROGRAM calls AC_LANG_SOURCE.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19681
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoWhen checking for va_copy, use AC_LANG_SOURCE to shut up recent autoconf
Simon McVittie [Mon, 9 May 2011 17:48:52 +0000 (18:48 +0100)]
When checking for va_copy, use AC_LANG_SOURCE to shut up recent autoconf

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19681
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoUse TP_ADD_COMPILER_FLAG to simplify application of warning-like CFLAGS
Simon McVittie [Mon, 9 May 2011 18:03:12 +0000 (19:03 +0100)]
Use TP_ADD_COMPILER_FLAG to simplify application of warning-like CFLAGS

This also means we check for support for them.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19681
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoUse TP_COMPILER_WARNINGS for all -Wfoo options
Simon McVittie [Mon, 9 May 2011 18:02:46 +0000 (19:02 +0100)]
Use TP_COMPILER_WARNINGS for all -Wfoo options

This consistently checks whether all these options actually work in the
current version of gcc.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19681
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoImport tp-compiler-flag.m4 and tp-compiler-warnings.m4 from telepathy-glib
Simon McVittie [Mon, 9 May 2011 17:32:51 +0000 (18:32 +0100)]
Import tp-compiler-flag.m4 and tp-compiler-warnings.m4 from telepathy-glib

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19681
Reviewed-by: Colin Walters <walters@verbum.org>
13 years agoNEWS
Simon McVittie [Wed, 25 May 2011 15:50:09 +0000 (16:50 +0100)]
NEWS

13 years agohandle_server_data_anonymous_mech: remove unnecessary debug output
Simon McVittie [Tue, 18 Jan 2011 16:34:12 +0000 (16:34 +0000)]
handle_server_data_anonymous_mech: remove unnecessary debug output

Doing a malloc and a hex-encoding pass just to produce a _dbus_verbose
message (i.e. a message that, in practice, nobody will see) seems like
overkill, and this block had incorrect error handling (not checking the
result of _dbus_string_init) which upsets static analysis tools.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
Bug-NB: NB#180486
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agodbus-launch: pass_info: always free strings on OOM
Simon McVittie [Tue, 18 Jan 2011 16:29:53 +0000 (16:29 +0000)]
dbus-launch: pass_info: always free strings on OOM

This doesn't really do anything, because we're about to exit anyway, but
it placates static analysis tools.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
Bug-NB: NB#180486
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agodbus-send: remove minor dead code
Simon McVittie [Wed, 26 Jan 2011 18:40:49 +0000 (18:40 +0000)]
dbus-send: remove minor dead code

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agodbus_connection_dispatch: remove dead code
Simon McVittie [Wed, 26 Jan 2011 18:38:01 +0000 (18:38 +0000)]
dbus_connection_dispatch: remove dead code

There's no way pending can be non-NULL here; if it was, we'd have jumped
straight past this block (getting filters from the connection), because
replies to pending calls don't go through filters.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
13 years agoSpelling fix.
Ralf Habacker [Sun, 22 May 2011 18:33:47 +0000 (20:33 +0200)]
Spelling fix.