Ralf Habacker [Mon, 14 Jun 2010 16:27:04 +0000 (18:27 +0200)]
Bug 28460 - Refactored dbus configuration access.
Libdbus uses several config variables. On unix these settings are read from
environment variables by using _dbus_getenv.
On other platforms like wince there are no environment variables available and
_dbus_getenv needs an emulation for those plattforms (see
dbus/dbus-sysdeps-wince-glue.c)
To cleanup this emulation the appended patch adds a config api by adding
_dbus_config_... functions.
Also having all client config related functions listed in one header file
provides a good overview about which config attributes are available.
The default implementation retrieves the config values from environment
variables. For other os this could be easily extended or replaced by.
Corrected thread problem causing some calls to hang for 25s
Since the connection lock is released for a short while in
_dbus_connection_acquire_io_path there can already be a method return
received by another thread. The fix is to do an extra check after the
I/O path has been aquired both.
num_fds is the number of elements of dirs currently in use. This bug
meant that encountering a previously un-watched directory would cause j
to increment forever, and so dirs[j] would eventually segfault.
(I've checked the corresponding code for inotify, and it's correct. I
wonder if some of the duplication could be eliminated.)
Thanks to Pablo Martí Gamboa <pmarti@warp.es> for reporting this issue!
David Zeuthen [Thu, 13 May 2010 14:25:22 +0000 (10:25 -0400)]
Add an extra parameter to the PropertiesChanged() signal
It was pointed out on the mailing list that it would be useful to know
that a given property has changed without conveying its value. Because
without this parameter a true_no_value property could change, however
there is no way for a client-side proxy to know _what_ property it was
(only that some property changed).
With the parameter, however, a client-side proxy can reliably discard
a cached property value.
Also rename the "true_no_value" to "invalidates" as the spec is now
using this language.
Also allow using the annotation in the enclosed interface name.
Also rename the annotation name so it uses Property in its name
instead of Properties. This is to be more consistent with the existing
org.freedesktop.DBus.Method.NoReply annotation which uses Method, not
Methods.
David Zeuthen [Fri, 7 May 2010 16:50:47 +0000 (12:50 -0400)]
Add an optional PropertiesChanged() signal
Some notes about this new signal
- The PropertiesChanged() signal is optional. An application can
convey support for this signal by either including or excluding it
from the returned introspection data much like apps not supporting
(or predating) the GetAll() method does not include GetAll() in the
introspection data.
- An object can use PropertiesChanged() but opt out of using it for
one or more properties by using the
Ray Strode [Mon, 10 May 2010 14:12:45 +0000 (10:12 -0400)]
Add clarification to spec about UpdateActivationEnvironment
UpdateActivationEnvironment takes a a{ss}. This means only
valid UTF-8 can be used. Environment variables are normally
ascii, but in theory have no specific encoding to them. This
means that certain valid environment variables can't be sent
to the bus for updating its activation environment.
This commit just adds a note to the spec explaining this
restriction.
Cmake support for cross plattform usable test files.
Recent test configuration files contains 'unix:...'
bus adresses which do not work on windows.
For cross plattform usable test files the whole
listen tag entry has to be set by the build system,
which is available with a new build system variable
named TEST_LISTEN.
To have the client client side definition in sync,
TEST_CONNECTION has been moved from c file into cmake
build system.
If there is a *.cmake test file available for
a related *.in file, take the *.cmake test file
instead of the *.in file as test file source.
Also added some messages.
We were previously using -Wno-format because we didn't have
a #define for DBUS_INT64_MODIFIER, which was really lame because
it easily hid problems.
For now, just define it if we're on glibc; this is obviously
not strictly correct but it's safe, because the formatting
is only used in DBUS_VERBOSE mode, and in tools/dbus-monitor.
Ideally we get the the glib code relicensed.
unknown [Mon, 22 Mar 2010 09:38:38 +0000 (10:38 +0100)]
Make the windows binaries and build match the linux one with cmake buildsystem.
This is performed by including the files from the client lib in the internal one
and by removing the linking to dbus-1 for targets using the internal library.
Ralf Habacker [Sat, 20 Mar 2010 21:30:16 +0000 (22:30 +0100)]
CMake dbus libraries usage cleanup.
Renamed DBUS_LIBRARIES to DBUS_INTERNAL_LIBRARIES and moved to top level CMakeLists.txt.
Removed obsolate references of dbus-internal library.
Added DBUS_LIBRARIES definition which contains only the dbus library.
Will Thompson [Thu, 4 Feb 2010 20:24:54 +0000 (20:24 +0000)]
Dispatch post-activation messages to anyone interested
Previously, if a method call activated a service, it would only be
delivered to that service, and not to other services with match rules
which should match. This patch replaces the improperly-duplicated
dispatch code in activation.c with a call back into the normal dispatch
code, fixing this bug (fd.o#26427).
(Additionally, were one to service-activate a service that doesn't
understand file descriptors with a message containing a file descriptor,
the previous code would send it anyway, and the service's dbus library
would blow up. This is also fixed here, since the normal dispatch code
checks this correctly.)