Commit graph

2266 commits

Author SHA1 Message Date
Colin Walters
6db588b854 Merge branch 'my-dbus-1.2' 2010-02-01 17:27:26 -05:00
Colin Walters
e59db9df47 Move system-activation.txt into non-conditional EXTRA_DIST
It doesn't depend on the XML doc generation.
2010-02-01 16:45:48 -05:00
Colin Walters
8a9880ffd2 Clean up inotify watch handling
Substantially based on a patch by Matthias Clasen <mclasen@redhat.com>
kqueue implementation by Joe Marcus Clarke <marcus@freebsd.org>

Previously, when we detected a configuration change (which included
the set of config directories to monitor for changes), we would
simply drop all watches, then readd them.

The problem with this is that it introduced a race condition where
we might not be watching one of the config directories for changes.

Rather than dropping and readding, change the OS-dependent monitoring
API to simply take a new set of directories to monitor.  Implicit
in this is that the OS-specific layer needs to keep track of the
previously monitored set.
2010-02-01 16:22:56 -05:00
Ralf Habacker
2016b83dec _dbus_change_to_daemon_user() is platform related and commit 0a3905d7f3 broke windows builds 2010-01-29 23:57:07 +01:00
Ralf Habacker
e77fff6dfa reverted 2aea64fbb6 because it breaks msvc2008 builds 2010-01-29 23:48:34 +01:00
Colin Walters
0705eb5c86 Update messagebus.in init script to start earlier
Patch from Fedora.
2010-01-28 17:31:36 -05:00
Colin Walters
2691b302aa [doc] diagram.[svg,png] to EXTRA_DIST
These files are part of the docs and should appear in tarballs.
2010-01-28 17:29:27 -05:00
Colin Walters
7a4cd46284 Merge branch 'my-dbus-1.2'
Conflicts:
	bus/Makefile.am
	dbus/dbus-sysdeps-util-unix.c
	dbus/dbus-transport.c
	test/test-service.c
2010-01-28 17:09:15 -05:00
Colin Walters
b93476ce07 Don't drop pending activations when reloading configuration
The reload handling for activation simply dropped all knowledge
of pending activations, which was clearly wrong.  Refactor things
so that reload only reloads directories, server address etc.

Based on a patch originally from Matthias Clasen <mclasen@redhat.com>
2010-01-28 17:01:24 -05:00
Colin Walters
0a3905d7f3 Switch to libcap-ng, avoid linking libdbus against libcap[-ng]
(Commit message written by Colin Walters <walters@verbum.org>)

A current Fedora goal is to convert projects to libcap-ng which
more easily allows dropping Linux capabilities.  For software
which also links to libdbus, it's problematic to link against
libcap as well.

Though really, libdbus should have never linked against libcap
in the first place, which is another thing this patch changes
by moving the libcap-using bits out of dbus/ and into bus/.

https://bugzilla.redhat.com/show_bug.cgi?id=518541
2010-01-28 17:01:24 -05:00
Colin Walters
5b2cf0d031 Add Will Thompson and Simon McVittie to reviewers, add emails to all
The reviewer list was sorely lacking actual email addresses; fix this.
Also add Will and Simon.
2010-01-28 17:01:24 -05:00
Colin Walters
b7e77c6b03 Ignore exit code zero from activated services
A variety of system components have migrated from legacy init into DBus
service activation.  Many of these system components "daemonize", which
involves forking.  The DBus activation system treated an exit as an
activation failure, assuming that the child process which grabbed the
DBus name didn't run first.

While we're in here, also differentiate in this code path between the
servicehelper (system) versus direct activation (session) paths.  In
the session activation path our error message mentioned a helper
process which was confusing, since none was involved.

Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
2010-01-28 17:01:24 -05:00
Will Thompson
a8e620a0ff Print all-printable-ASCII byte arrays as strings
In practice, ay seems to be used mostly for binary data (in which case,
hex output is fine) or for Unix file paths (because they may be
non-UTF-8) and similar human-readable strings. So let's print the latter
similarly to strings.
2010-01-28 17:01:24 -05:00
Will Thompson
1a33efb54b Print byte arrays as nicely-formatted hex. 2010-01-28 17:01:23 -05:00
Will Thompson
3171383ce9 Add an accessor for the loader's corruption reason 2010-01-28 17:01:23 -05:00
Will Thompson
7cf332d34e Include reason when reporting corrupt messages
It would have been much easier to diagnose fd.o#19723 if the error
message had said more than just "Message is corrupted".
2010-01-28 17:01:23 -05:00
Will Thompson
ce87333cac Forbid zero serial numbers 2010-01-28 17:01:23 -05:00
Will Thompson
7a8fcdee22 Make array-printing code easier to follow
Previously dbus_message_iter_get_arg_type() was called twice: once in
the loop condition to update 'current_type', and once to check if the
loop will run again. This patch moves updating current_type to the end
of the loop body.
2010-01-28 17:01:23 -05:00
James Westby
e2aee8bdeb Correct timeout handling
The timeout handling code subtracts the elapsed time from the timeout
each time a message is received, which drastically reduces the timeout
in circumstances such as service activation.

Correct so that the timeout is never modified, and the elapsed time
instead subtracted where necessary.

Signed-off-by: James Westby <jw+debian@jameswestby.net>
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
2010-01-28 17:01:23 -05:00
Marcus Brinkmann
1e82db4743 Allow to override test tool path for cross compilation setup. 2010-01-28 11:26:07 +01:00
Hendrik Buschmeier
6067f88afd Bug 23502 - corrected wrong verbose-output 2010-01-28 11:22:32 +01:00
Marcus Brinkmann
c7b72f4bc7 Invoke AC_PROG_MKDIR_P to make sure MKDIR_P is defined. 2010-01-28 10:44:23 +01:00
Marcus Brinkmann
2aea64fbb6 Only list those symbols that can be exported (new toolchain barfs on undefined symbols in export list). 2010-01-28 10:44:22 +01:00
Marcus Brinkmann
57601bf01a Include errno.h. 2010-01-28 10:44:21 +01:00
Marcus Brinkmann
30af0a1c5f Fix buffer underrun and clarify condition. 2010-01-20 14:42:14 +01:00
Colin Walters
983cca443d Add Will Thompson and Simon McVittie to reviewers, add emails to all
The reviewer list was sorely lacking actual email addresses; fix this.
Also add Will and Simon.
2010-01-15 16:57:39 -05:00
Romain Pokrzywka
d4440ef7bb fixes bug where sometimes objects were not unregistered from dbus
although their app had exited. As it turns out it was a missing
implementation of the method _dbus_fd_set_close_on_exec() for windows.
It's been tested with msvc2005, msvc2008, and mingw, and solves
all the unregistering issues on many kde apps.
2010-01-14 09:10:25 +01:00
Will Thompson
0411f9d632 Rename DBusConnection *disconnected param to connection 2010-01-05 21:11:13 +01:00
Will Thompson
b4264cb0e6 Group match rules by their interface.
In my informal studies of "normal" sets of match rules, only checking
match rules with the appropriate interface for the message reduces the
number that need to be checked by almost 100x on average (ranging from
halving for messages from the bus daemon, to a >200x reduction in many
cases). This reduces the overhead added to dispatching each message by
having lots of irrelevant match rules.
2010-01-05 21:11:12 +01:00
Will Thompson
86d0d2baf5 Extract rule_list_remove_by_connection 2010-01-05 21:11:12 +01:00
Will Thompson
a2c4eca52a Extract freeing a DBusList<BusMatchRule> 2010-01-05 21:11:11 +01:00
Will Thompson
38ead76613 Don't bother re-matching features we've checked.
This is currently not a big deal, but will make more of a difference
once the set of match rules is partitioned by more features than just
the message type.
2010-01-05 21:11:10 +01:00
Will Thompson
647912b81f Index match rules by message type
This avoids scanning all the signal matches while dispatching method
calls and returns, which are rarely matched against.
2010-01-05 21:11:09 +01:00
Will Thompson
a6a21bf335 Add a constant for the number of message types 2010-01-05 21:11:09 +01:00
Ralf Habacker
622e66944c added tranport address format to dbus specification 2009-12-23 23:28:48 +01:00
Ralf Habacker
658be8be7b added initial tcp transport section 2009-12-23 11:11:20 +01:00
Ralf Habacker
fdf24b805e nonce tcp support requires _dbus_string_equal_len also when build without tests 2009-12-23 10:43:53 +01:00
Ralf Habacker
14c31804ad fixed install root when using msvc ide 2009-12-22 10:53:05 +01:00
Ralf Habacker
7f3e29ffdf let dbus_verbose print file name, line number and function name if available; this eases debugging. 2009-12-19 20:51:54 +01:00
Matthias Clasen
8343c971cd Bug 25697 - Fix memory leak in policy reload
Signed-off-by: Colin Walters <walters@verbum.org>
2009-12-18 14:29:40 -05:00
Ralf Habacker
25ac34ab64 removed local definition of _DBUS_GNUC_PRINTF, it is already in dbus-macro.h 2009-12-18 17:40:44 +01:00
Ralf Habacker
68fb041ac3 DBusPipe related unix compile fix 2009-12-18 17:35:43 +01:00
Ralf Habacker
8a4429ff86 added pipe related files real 2009-12-18 16:54:44 +01:00
Ralf Habacker
182a261baf Merge branch 'master' of ssh://git.freedesktop.org/git/dbus/dbus 2009-12-18 16:46:11 +01:00
Ralf Habacker
be51ff7e5e windows does not support fork, skip it 2009-12-18 16:45:50 +01:00
Ralf Habacker
35eb740bda moved out DBusPipe implementation into separate files 2009-12-18 14:18:22 +01:00
Ralf Habacker
49728a47b2 moved out DBusPipe implementation from into separate files 2009-12-18 13:32:37 +01:00
Colin Walters
949a64b127 Ignore exit code zero from activated services
A variety of system components have migrated from legacy init into DBus
service activation.  Many of these system components "daemonize", which
involves forking.  The DBus activation system treated an exit as an
activation failure, assuming that the child process which grabbed the
DBus name didn't run first.

While we're in here, also differentiate in this code path between the
servicehelper (system) versus direct activation (session) paths.  In
the session activation path our error message mentioned a helper
process which was confusing, since none was involved.

Based on a patch and debugging research from Ray Strode <rstrode@redhat.com>
2009-12-15 13:08:02 -05:00
Ralf Habacker
aab383a63e added new variable DBUS_BUILD_TIMESTAMP 2009-12-14 23:31:38 +01:00
Ralf Habacker
f27dd9b8f2 fixed memory leak 2009-12-07 10:16:10 +01:00