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

13 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

13 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

13 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

13 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

13 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

13 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

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

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 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>
13 years agoMerge branch 'dbus-1.4'
Simon McVittie [Thu, 28 Jul 2011 10:32:46 +0000 (11:32 +0100)]
Merge branch 'dbus-1.4'

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 agoMerge branch 'dbus-1.4'
Simon McVittie [Wed, 27 Jul 2011 17:54:35 +0000 (18:54 +0100)]
Merge branch 'dbus-1.4'

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 agoMerge branch 'dbus-1.4'
Simon McVittie [Tue, 26 Jul 2011 17:00:57 +0000 (18:00 +0100)]
Merge branch 'dbus-1.4'

Conflicts:
dbus/dbus-message.c

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 agoMerge branch 'dbus-1.4'
Simon McVittie [Tue, 26 Jul 2011 10:51:13 +0000 (11:51 +0100)]
Merge branch 'dbus-1.4'

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 agoMerge branch 'dbus-1.4' and update NEWS for master
Simon McVittie [Mon, 18 Jul 2011 18:42:35 +0000 (19:42 +0100)]
Merge branch 'dbus-1.4' and update NEWS for master

Conflicts:
NEWS

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_open_unix_socket: make static
Simon McVittie [Wed, 22 Jun 2011 11:31:24 +0000 (12:31 +0100)]
_dbus_open_unix_socket: make static

It isn't called from outside its translation unit.

13 years ago_dbus_open_tcp_socket: remove
Simon McVittie [Wed, 22 Jun 2011 11:31:08 +0000 (12:31 +0100)]
_dbus_open_tcp_socket: remove

It's only implemented on Unix, internal to dbus, and never called.

13 years agoMerge branch 'dbus-1.4'
Simon McVittie [Mon, 18 Jul 2011 14:15:45 +0000 (15:15 +0100)]
Merge branch 'dbus-1.4'

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 agoMerge branch 'dbus-1.4'
Simon McVittie [Thu, 14 Jul 2011 15:49:02 +0000 (16:49 +0100)]
Merge branch 'dbus-1.4'

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 agoAdd testsuite for eavesdrop=true DBusMatchRule
Cosimo Alfarano [Wed, 13 Jul 2011 17:05:32 +0000 (18:05 +0100)]
Add testsuite for eavesdrop=true DBusMatchRule

[with some typos fixed during commit -smcv]

Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37890
Bug-NB: NB#269748

13 years agoFix dbus-monitor using eavesdrop=true when no filters are passed
Cosimo Alfarano [Tue, 12 Jul 2011 14:56:43 +0000 (15:56 +0100)]
Fix dbus-monitor using eavesdrop=true when no filters are passed

Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
13 years agoDBusHeader: only store byte-order in the fixed-length header
Simon McVittie [Fri, 10 Jun 2011 09:12:07 +0000 (10:12 +0100)]
DBusHeader: only store byte-order in the fixed-length header

Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38287

13 years agoDBusMessage: don't redundantly store byte order, ask the DBusHeader
Simon McVittie [Fri, 10 Jun 2011 09:10:54 +0000 (10:10 +0100)]
DBusMessage: don't redundantly store byte order, ask the DBusHeader

Reviewed-by: Thiago Macieira <thiago@kde.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38287

13 years agoAdd "eavesdrop=true" as constant match rule for dbus-monitor
Cosimo Alfarano [Thu, 7 Jul 2011 15:10:54 +0000 (16:10 +0100)]
Add "eavesdrop=true" as constant match rule for dbus-monitor

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37890
Bug-NB: NB#269748
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
13 years agoDo not allow eavedropping unless rule owner explicitely declare it
Cosimo Alfarano [Mon, 11 Jul 2011 16:03:00 +0000 (17:03 +0100)]
Do not allow eavedropping unless rule owner explicitely declare it

Adds "eavesdrop=true" as a match rule, meaning that the owner
intend to eavedrop.
Otherwise the owner will receive only broadcasted messages and the ones
meant to be delivered to it.

[plus a typo fix in an error message -smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=37890
Bug-NB: NB#269748
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
13 years agoMerge remote-tracking branch 'origin/dbus-1.4'
Simon McVittie [Mon, 11 Jul 2011 12:23:38 +0000 (13:23 +0100)]
Merge remote-tracking branch 'origin/dbus-1.4'

13 years agoDBusConnection: simplify registering object paths code
Jiří Klimeš [Fri, 1 Jul 2011 11:59:48 +0000 (13:59 +0200)]
DBusConnection: simplify registering object paths code

Introduce static generic _dbus_connection_register_object_path()
function to remove duplicate code for registration object paths.
Having *four* almost the same functions is error-prone and hard
to follow as well.

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 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 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 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 agoFixed cmake buildsystem - option command only supports boolean values
Ralf Habacker [Mon, 4 Jul 2011 21:47:45 +0000 (23:47 +0200)]
Fixed cmake buildsystem - option command only supports boolean values

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 agoLimit batch file creating to windows
Ralf Habacker [Sat, 2 Jul 2011 22:54:20 +0000 (00:54 +0200)]
Limit batch file creating to windows

13 years agoFixed cmake buildsystem on unix - option command only supports boolean values
Ralf Habacker [Sun, 3 Jul 2011 00:01:25 +0000 (02:01 +0200)]
Fixed cmake buildsystem on unix - option command only supports boolean values

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 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 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 agoMerge branch 'dbus-1.4'
Simon McVittie [Fri, 1 Jul 2011 13:54:42 +0000 (14:54 +0100)]
Merge branch 'dbus-1.4'

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 agoInclude size of link cache in per-connection statistics
Simon McVittie [Tue, 8 Feb 2011 15:48:12 +0000 (15:48 +0000)]
Include size of link cache in per-connection statistics

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

13 years agoAlso record peak values for queued bytes/fds in connection stats
Simon McVittie [Fri, 11 Feb 2011 17:16:09 +0000 (17:16 +0000)]
Also record peak values for queued bytes/fds in connection stats

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

13 years agoAdd an initial round of stats to the Stats interface
Simon McVittie [Tue, 8 Feb 2011 15:41:54 +0000 (15:41 +0000)]
Add an initial round of stats to the Stats interface

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

13 years agoDBusConnection, DBusTransport: add queue statistics
Simon McVittie [Tue, 8 Feb 2011 12:51:33 +0000 (12:51 +0000)]
DBusConnection, DBusTransport: add queue statistics

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

13 years agoBusConnections: add usage stats for well-known names, match rules
Simon McVittie [Tue, 8 Feb 2011 12:31:08 +0000 (12:31 +0000)]
BusConnections: add usage stats for well-known names, match rules

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

13 years agoDBusList: add usage stats
Simon McVittie [Tue, 8 Feb 2011 12:30:06 +0000 (12:30 +0000)]
DBusList: add usage stats

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

13 years agoDBusMemPool: add usage stats
Simon McVittie [Tue, 8 Feb 2011 12:29:52 +0000 (12:29 +0000)]
DBusMemPool: add usage stats

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

13 years agoAdd a stub .Debug.Stats interface if --enable-stats
Simon McVittie [Tue, 8 Feb 2011 15:33:35 +0000 (15:33 +0000)]
Add a stub .Debug.Stats interface if --enable-stats

There are no actual statistics yet, just a count of how many times the
method has been called, and (for the per-connection stats) the unique name.

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

13 years agoconfigure.ac: add --enable-stats
Simon McVittie [Tue, 1 Mar 2011 15:14:02 +0000 (15:14 +0000)]
configure.ac: add --enable-stats

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

13 years agomatch_rule_to_string: don't reinvent dbus_message_type_to_string
Simon McVittie [Mon, 31 Jan 2011 15:55:53 +0000 (15:55 +0000)]
match_rule_to_string: don't reinvent dbus_message_type_to_string

We don't allow match rules with unknown message types, so losing the
"type='%d'" case isn't a great loss.

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

13 years agoRemove maximum length field from DBusString
Simon McVittie [Wed, 22 Jun 2011 13:57:56 +0000 (14:57 +0100)]
Remove maximum length field from DBusString

The source code says it's "a historical artifact from a feature that
turned out to be dumb". Respond accordingly!

This reduces sizeof (DBusString) by 20% on ILP32 architectures, which
can't hurt. (No reduction on LP64 architectures that align pointers
naturally, unfortunately.)

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38570
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoRemove unused _dbus_string_copy_data_len, _dbus_string_steal_data_len
Simon McVittie [Wed, 22 Jun 2011 13:56:27 +0000 (14:56 +0100)]
Remove unused _dbus_string_copy_data_len, _dbus_string_steal_data_len

They're only compiled when building tests.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38570
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoSplit DBUS_GENERIC_STRING_PREAMBLE into sensible lines
Simon McVittie [Wed, 22 Jun 2011 13:44:28 +0000 (14:44 +0100)]
Split DBUS_GENERIC_STRING_PREAMBLE into sensible lines

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38570
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
13 years agoCMake fix: Do not use FORCE in variables which should be changeable by the user.
Ralf Habacker [Mon, 20 Jun 2011 07:29:12 +0000 (09:29 +0200)]
CMake fix: Do not use FORCE in variables which should be changeable by the user.

13 years agofixed cmake error: doc says CACHE needs type *and* doc string
Ralf Habacker [Tue, 14 Jun 2011 16:45:46 +0000 (18:45 +0200)]
fixed cmake error: doc says CACHE needs type *and* doc string

13 years agoUse epoll in a backwards-compatible way on Linux < 2.6.27
Simon McVittie [Thu, 3 Feb 2011 17:18:09 +0000 (17:18 +0000)]
Use epoll in a backwards-compatible way on Linux < 2.6.27

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191
Bug-NB: NB#225019

13 years agoMaintain the set of polled sockets over time
Simon McVittie [Wed, 26 Jan 2011 16:41:32 +0000 (16:41 +0000)]
Maintain the set of polled sockets over time

This enables us to benefit from epoll(4): polling is now
O(number of watch changes + number of active fds), whereas with poll(2)
it's O(total number of fds).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191

13 years agoAdd a stub _dbus_loop_toggle_watch and call it where needed
Simon McVittie [Mon, 24 Jan 2011 17:11:52 +0000 (17:11 +0000)]
Add a stub _dbus_loop_toggle_watch and call it where needed

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191

13 years agoAdd an implementation of DBusSocketSet using epoll
Simon McVittie [Mon, 13 Jun 2011 16:12:42 +0000 (17:12 +0100)]
Add an implementation of DBusSocketSet using epoll

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191
Bug-NB: NB#225019

13 years agoCheck for epoll in configure.ac
Simon McVittie [Tue, 25 Jan 2011 18:29:40 +0000 (18:29 +0000)]
Check for epoll in configure.ac

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191

13 years agoDBusSocketSet: new abstraction for struct pollfd[] or whatever
Simon McVittie [Mon, 13 Jun 2011 16:04:30 +0000 (17:04 +0100)]
DBusSocketSet: new abstraction for struct pollfd[] or whatever

In this second version of this patch, DBusSocketSet is an "abstract base
class" so that when using a better OS-specific API fails, we can always fall
back to _dbus_poll(). For instance, this is necessary when the "better
OS-specific API" is epoll on Linux, the build machine has a modern glibc
version, and the host machine either has an old kernel, is emulated in qemu
(which does not support the epoll syscalls yet), or both.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33337
Bug-NB: NB#197191
Bug-NB: NB#225019

13 years agoNEWS
Simon McVittie [Mon, 13 Jun 2011 15:54:00 +0000 (16:54 +0100)]
NEWS

13 years agoDBusLoop: store watches in a hash table keyed by fd
Simon McVittie [Thu, 7 Apr 2011 16:36:54 +0000 (17:36 +0100)]
DBusLoop: store watches in a hash table keyed by fd

This means we don't need to build up the watches_for_fds array, because
it's quick to find the watches based on the fd.

This also fixes fd.o #23194, because we only put each fd in the
array of DBusPollFD once, with the union of all its watches' flags; we
can no longer get more entries in the array than our number of file
descriptors, which is capped at our RLIMIT_NOFILE, so we can't get
EINVAL from poll(2).

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=23194
Reviewed-by: Thiago Macieira <thiago@kde.org>
13 years agoDBusLoop: fold Callback into TimeoutCallback
Simon McVittie [Mon, 24 Jan 2011 15:30:02 +0000 (15:30 +0000)]
DBusLoop: fold Callback into TimeoutCallback

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33342
Reviewed-by: Thiago Macieira <thiago@kde.org>
13 years agoDrop WatchCallback entirely, just use a list of DBusWatch in the main loop
Simon McVittie [Tue, 25 Jan 2011 12:55:27 +0000 (12:55 +0000)]
Drop WatchCallback entirely, just use a list of DBusWatch in the main loop

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33342
Reviewed-by: Thiago Macieira <thiago@kde.org>