platform/upstream/dbus.git
14 years agodbus/dbus-sysdeps-win.c: use GetTempPath, not getenv, in _dbus_get_tmpdir (cherry...
Tor Lillqvist [Wed, 22 Apr 2009 11:27:44 +0000 (13:27 +0200)]
dbus/dbus-sysdeps-win.c: use GetTempPath, not getenv, in _dbus_get_tmpdir (cherry picked from commit c2366c5410149e896cb56c3d17bb995308e18292)

14 years agodbus/dbus-sysdeps-win.c: _dbus_getpid() returns dbus_pid_t (cherry picked from commit...
Tor Lillqvist [Wed, 22 Apr 2009 10:26:04 +0000 (12:26 +0200)]
dbus/dbus-sysdeps-win.c: _dbus_getpid() returns dbus_pid_t (cherry picked from commit 40a01bf6d2c6d216093d309ca4c48602a585960b)

14 years agodbus/dbus-sysdeps-win.c: set an error when _close fails in _dbus_pipe_close (cherry...
Tor Lillqvist [Wed, 22 Apr 2009 10:24:40 +0000 (12:24 +0200)]
dbus/dbus-sysdeps-win.c: set an error when _close fails in _dbus_pipe_close (cherry picked from commit 6671b4a20da468bad6842815a1161a98251b66fc)

14 years agodbus/dbus-sysdeps-win.c: Use CryptoApi to get random numbers (cherry picked from...
Tor Lillqvist [Wed, 22 Apr 2009 10:22:33 +0000 (12:22 +0200)]
dbus/dbus-sysdeps-win.c: Use CryptoApi to get random numbers (cherry picked from commit 5f7ae46398818200b3fdcdfe80b78bee31a3e89b)

14 years agodbus/dbus-sysdeps-*win.c: remove DBusFile abstraction (cherry picked from commit...
Tor Lillqvist [Wed, 22 Apr 2009 10:17:35 +0000 (12:17 +0200)]
dbus/dbus-sysdeps-*win.c: remove DBusFile abstraction (cherry picked from commit 2895660b0e683d71dd51911819c0f31aff8517c3)

14 years agodbus/dbus-sysdeps-win.c: #define socklen_t -> typedef (cherry picked from commit...
Tor Lillqvist [Wed, 22 Apr 2009 09:54:24 +0000 (11:54 +0200)]
dbus/dbus-sysdeps-win.c: #define socklen_t -> typedef (cherry picked from commit eb104f4573fcbcbf3a87d673a023b5db4a249867)

14 years agodbus/dbus-sysdeps-win.h: add _dbus_win_get_dll-module (cherry picked from commit...
Tor Lillqvist [Wed, 22 Apr 2009 08:48:59 +0000 (10:48 +0200)]
dbus/dbus-sysdeps-win.h: add _dbus_win_get_dll-module (cherry picked from commit da5e8e14029cb64a65fe482e232be1d786a8ee19)

14 years agodbus/dbus-spawn-win.c: implement missing _dbus_babysitter_get_child_exit_status ...
Tor Lillqvist [Wed, 22 Apr 2009 08:11:27 +0000 (10:11 +0200)]
dbus/dbus-spawn-win.c: implement missing _dbus_babysitter_get_child_exit_status (cherry picked from commit 7a9863b9847380dbb8400f895934d7f282ebdbf2)

14 years agodbus/dbus-internals.c: "#define inline" is only needed on MSVC, not mingw (cherry...
Tor Lillqvist [Wed, 22 Apr 2009 08:08:41 +0000 (10:08 +0200)]
dbus/dbus-internals.c: "#define inline" is only needed on MSVC, not mingw (cherry picked from commit 314e91e3ee2566477918a51dbddd9eb141b33a23)

14 years ago_dbus_verbose_real: (optionally) use OutputDebugString() (cherry picked from commit...
Ralf Habacker [Tue, 6 Jan 2009 13:01:20 +0000 (13:01 +0000)]
_dbus_verbose_real: (optionally) use OutputDebugString() (cherry picked from commit fd6d354c47b4b8dc24ce32e31171568a8704e7d1)

14 years agoadded DBUS_USE_OUTPUT_DEBUG_STRING option
Ralf Habacker [Mon, 30 Nov 2009 12:10:38 +0000 (13:10 +0100)]
added DBUS_USE_OUTPUT_DEBUG_STRING option

14 years agodbus/dbus-internals.h: 2x const char foo[] -> const char foo * (cherry picked from...
Tor Lillqvist [Wed, 22 Apr 2009 08:07:47 +0000 (10:07 +0200)]
dbus/dbus-internals.h: 2x const char foo[] -> const char foo * (cherry picked from commit 62eaf8c91160abdeab6a46bb7bff737e13a390cf)

14 years agodbus/dbus-transport.c: _dbus_credentials_get_windows_sid might return NULL (cherry...
Tor Lillqvist [Wed, 22 Apr 2009 07:42:01 +0000 (09:42 +0200)]
dbus/dbus-transport.c: _dbus_credentials_get_windows_sid might return NULL (cherry picked from commit 8d8d5fa1babc8f51f1d1bb95b8116850978c60d9)

14 years agodbus/dbus-transport.c: fix {our,auth}_identity mismatch (cherry picked from commit...
Tor Lillqvist [Wed, 22 Apr 2009 07:40:35 +0000 (09:40 +0200)]
dbus/dbus-transport.c: fix {our,auth}_identity mismatch (cherry picked from commit e15f1cde3b5893357f640e360f64c0a1ae37f93b)

14 years agocompleted notes
Ralf Habacker [Mon, 30 Nov 2009 11:14:24 +0000 (12:14 +0100)]
completed notes

14 years agotools/dbus-launch-win.c: TODO++ (cherry picked from commit 0f5dbec6407975d6a93fbb2cbc...
Tor Lillqvist [Wed, 22 Apr 2009 07:30:23 +0000 (09:30 +0200)]
tools/dbus-launch-win.c: TODO++ (cherry picked from commit 0f5dbec6407975d6a93fbb2cbcd58ab192961cf8)

14 years agodbus/dbus-connection.c: use dbus_message_type_to_string instead of printing the naked...
Tor Lillqvist [Wed, 22 Apr 2009 07:20:04 +0000 (09:20 +0200)]
dbus/dbus-connection.c: use dbus_message_type_to_string instead of printing the naked message type (cherry picked from commit 33d858e83e3cb1f55ed257ffef930b8f49c3ffc7)

14 years agoFix broken Windows implementation of _dbus_printf_string_upper_bound().
Ole André Vadla Ravnås [Sun, 29 Mar 2009 00:44:44 +0000 (01:44 +0100)]
Fix broken Windows implementation of _dbus_printf_string_upper_bound().

Pass the correct buffer size when trying again, and keep trying with
larger buffer sizes, doubling the size each time.
(cherry picked from commit 95832a94607eea609de994467b7d64e36af72e6b)

14 years agoUse CreateDirectory() instead of complicating things.
Ole André Vadla Ravnås [Sun, 29 Mar 2009 00:20:02 +0000 (01:20 +0100)]
Use CreateDirectory() instead of complicating things.

This is Windows sysdeps after all, and _dbus_mkdir() wasn't used anywhere else.
(cherry picked from commit 0bbe3787ce1e9e992f2bcbbdfcab1dcdb0b41f24)

14 years agoRemove a misleading comment.
Ole André Vadla Ravnås [Sun, 29 Mar 2009 00:06:54 +0000 (01:06 +0100)]
Remove a misleading comment.

errno.h is present and needed on Windows. (It's not present on Windows CE though.)
(cherry picked from commit cef676c0c7ea8ad352e1ecf1c3643edb1abd7ad6)

14 years agoAdd missing stdio.h include needed for _vsnprintf(). (cherry picked from commit dddd4...
Ole André Vadla Ravnås [Sat, 28 Mar 2009 23:49:34 +0000 (00:49 +0100)]
Add missing stdio.h include needed for _vsnprintf(). (cherry picked from commit dddd412402657fa5ac6de225e8d5a00fb290589c)

14 years agoOnly define _WIN32_WINNT if not already defined. (cherry picked from commit 98bb07181...
Ole André Vadla Ravnås [Sat, 28 Mar 2009 23:47:42 +0000 (00:47 +0100)]
Only define _WIN32_WINNT if not already defined. (cherry picked from commit 98bb071819ab9f886317627b6688876f40ed694e)

14 years agotools/dbus-launch-win.c: strrchr -> _mbsrchr (cherry picked from commit b8b9fc300242f...
Tor Lillqvist [Wed, 22 Apr 2009 07:29:45 +0000 (09:29 +0200)]
tools/dbus-launch-win.c: strrchr -> _mbsrchr (cherry picked from commit b8b9fc300242ff25071df4166173baae7d2b4f0f)

14 years agoFix DBusMessage compiler warnings by adding some missing casts.
Ole André Vadla Ravnås [Sat, 28 Mar 2009 23:39:29 +0000 (00:39 +0100)]
Fix DBusMessage compiler warnings by adding some missing casts.

Basically the case where the address of a const pointer is passed as a non-const void pointer.
(cherry picked from commit dab3ec2abe7fbeea4dab873c8575a45b3b18882d)

14 years agodbus/dbus-sysdeps-util-win.c: DBUS_WIN is always defined here (cherry picked from...
Tor Lillqvist [Wed, 22 Apr 2009 07:53:11 +0000 (09:53 +0200)]
dbus/dbus-sysdeps-util-win.c: DBUS_WIN is always defined here (cherry picked from commit 1046f3b0eb57ef746aaff3a8da87020bb1b19a44)

14 years agotools/dbus-launch-win.c: fix typo (cherry picked from commit 81a7a0e9309e5929857fdf44...
Tor Lillqvist [Wed, 22 Apr 2009 07:31:26 +0000 (09:31 +0200)]
tools/dbus-launch-win.c: fix typo (cherry picked from commit 81a7a0e9309e5929857fdf44b8b51a4f8df097e6)

14 years agofix warning, use Sleep, not _sleep on windows (cherry picked from commit ea36c743ad60...
Frank Osterfeld [Sun, 3 May 2009 18:52:48 +0000 (19:52 +0100)]
fix warning, use Sleep, not _sleep on windows (cherry picked from commit ea36c743ad60a2dd5c6286571d1a475903519809)

14 years agodefine DBUS_BUILD_TESTS only if the option is enabled (cherry picked from commit...
Frank Osterfeld [Wed, 29 Apr 2009 11:22:44 +0000 (13:22 +0200)]
define DBUS_BUILD_TESTS only if the option is enabled (cherry picked from commit 46c3a4e653c17c1daaabf164663856f373330f29)

14 years agofix TEST_SOCKET_DIR on windows, do not override value from top-level in test/ (cherry...
Frank Osterfeld [Tue, 28 Apr 2009 17:12:09 +0000 (18:12 +0100)]
fix TEST_SOCKET_DIR on windows, do not override value from top-level in test/ (cherry picked from commit fde144333281348cda2d533331946996d7a09bff)

14 years agodisable launch-helper on windows for now until it builds (cherry picked from commit...
Frank Osterfeld [Tue, 28 Apr 2009 14:45:03 +0000 (15:45 +0100)]
disable launch-helper on windows for now until it builds (cherry picked from commit 48da3a0450172f711c25a459ce70c2521d22ee27)

14 years agobus-test-launch-helper is a unit test, test-service and test-shell-service are not...
Frank Osterfeld [Tue, 28 Apr 2009 14:14:13 +0000 (16:14 +0200)]
bus-test-launch-helper is a unit test, test-service and test-shell-service are not. Rename test-shell to shell-test to match autotools (cherry picked from commit b106387b73d6a300a013a15f6507244e82f007ed)

14 years agoUse correct sources to build test-shell-service, fixes a hang in bus-test (cherry...
Frank Osterfeld [Tue, 28 Apr 2009 13:46:19 +0000 (15:46 +0200)]
Use correct sources to build test-shell-service, fixes a hang in bus-test (cherry picked from commit 0afe04db5152b57582863bef83a55d78020a79c6)

14 years agoremoved obsolate files
Ralf Habacker [Mon, 30 Nov 2009 10:28:37 +0000 (11:28 +0100)]
removed obsolate files

14 years agocleanup: these files are already generated elsewhere (cherry picked from commit 21f66...
Frank Osterfeld [Tue, 28 Apr 2009 08:19:47 +0000 (10:19 +0200)]
cleanup: these files are already generated elsewhere (cherry picked from commit 21f66df24affd4a4d2fb3324fb51899c811530da)

14 years agorename test-spawn to spawn-test, to match autotools. test-sleep-forever is not a...
Frank Osterfeld [Tue, 28 Apr 2009 09:26:05 +0000 (11:26 +0200)]
rename test-spawn to spawn-test, to match autotools. test-sleep-forever is not a stand-alone test but called from other tests (cherry picked from commit 41bf95167cfc17b564594eab0a1901e46eaab5fe)

14 years agofix test and binary names (cherry picked from commit 18bcf5f2d474456c57cd94da234005a2...
Frank Osterfeld [Tue, 28 Apr 2009 09:08:31 +0000 (11:08 +0200)]
fix test and binary names (cherry picked from commit 18bcf5f2d474456c57cd94da234005a23e2589a7)

14 years agorename second test-names to test-names2 to avoid confusion (cherry picked from commit...
Frank Osterfeld [Tue, 28 Apr 2009 09:02:29 +0000 (11:02 +0200)]
rename second test-names to test-names2 to avoid confusion (cherry picked from commit c83a2d79bb215b19b02987c9a45ed1bf07e5eeaf)

14 years agobuild dbus-daemon-launch-helper-test and friends set all TEST vars needed for the...
Frank Osterfeld [Mon, 27 Apr 2009 19:21:02 +0000 (21:21 +0200)]
build dbus-daemon-launch-helper-test and friends set all TEST vars needed for the .in files (cherry picked from commit fcd9ba392927b0433e5e037d393230774edae303)

14 years agodo not add d suffix on non-windows (cherry picked from commit 27980491d3cac6166c30c4a...
Frank Osterfeld [Mon, 27 Apr 2009 18:52:52 +0000 (20:52 +0200)]
do not add d suffix on non-windows (cherry picked from commit 27980491d3cac6166c30c4adc2c71d80c3e4e13a)

14 years agogenerate all config files from the .in files. Set some of the required variables...
Frank Osterfeld [Mon, 27 Apr 2009 15:58:45 +0000 (17:58 +0200)]
generate all config files from the .in files. Set some of the required variables replaced in the .in files by configure_file (cherry picked from commit 4980ffa1093877af182e032a13f6162df57be09f)

14 years agouse CMAKE_BUILD_TYPE to differ between debug and release. (cherry picked from commit...
Sebastian Sauer [Mon, 27 Apr 2009 15:06:37 +0000 (17:06 +0200)]
use CMAKE_BUILD_TYPE to differ between debug and release. (cherry picked from commit 212268933438f3340e5c95905a2845d30cab1dd7)

14 years agouse correct test data dir (cherry picked from commit ef471a74068b198ed10fe2a377520aa6...
Frank Osterfeld [Mon, 27 Apr 2009 14:12:50 +0000 (16:12 +0200)]
use correct test data dir (cherry picked from commit ef471a74068b198ed10fe2a377520aa6a68b8370)

14 years agodon't leak string list in error case (cherry picked from commit e4f39254976544781f106...
Frank Osterfeld [Wed, 22 Apr 2009 14:26:06 +0000 (15:26 +0100)]
don't leak string list in error case (cherry picked from commit e4f39254976544781f1060c2051b10f32628408e)

14 years agoadd check for abstract sockets (cherry picked from commit 5b657984f4bc5544a8df560adcd...
Frank Osterfeld [Wed, 22 Apr 2009 09:49:58 +0000 (11:49 +0200)]
add check for abstract sockets (cherry picked from commit 5b657984f4bc5544a8df560adcd224ed243972f1)

14 years agobe more verbose when locking the mutex fails (cherry picked from commit 4a14a050c4be0...
Frank Osterfeld [Wed, 22 Apr 2009 11:49:45 +0000 (12:49 +0100)]
be more verbose when locking the mutex fails (cherry picked from commit 4a14a050c4be026c7b9d67fd1f47c8479edebfc4)

14 years agodo not call functions with side-effects inside assert (cherry picked from commit...
Frank Osterfeld [Tue, 21 Apr 2009 15:21:06 +0000 (16:21 +0100)]
do not call functions with side-effects inside assert (cherry picked from commit 0d0f443564403fedffd0450bed377230511ba0d7)

14 years agofix configure check and VA_COPY usage
Frank Osterfeld [Tue, 28 Apr 2009 15:10:46 +0000 (17:10 +0200)]
fix configure check and VA_COPY usage

* fix configure check: set DBUS_VA_COPY_FUNC correctly, and DBUS_VA_COPY_AS_ARRAY if no usable one was found
* add DBUS_VA_COPY_AS_ARRAY
* define DBUS_VA_COPY indirectly, cmakedefine plus variable does not work for me on windows, and is the wrong thing to do according to Allen. The undef seems unnecessary now, the address parsing test passes on windows, using mingw
(cherry picked from commit e6680d78d943be4ee2d85e9d82cd8aa1350db882)

14 years agoset -DDBUS_BUILD_TESTS remove -g, it's already set via CMAKE_BUILD_TYPE (cherry picke...
Frank Osterfeld [Thu, 23 Apr 2009 10:16:49 +0000 (12:16 +0200)]
set -DDBUS_BUILD_TESTS remove -g, it's already set via CMAKE_BUILD_TYPE (cherry picked from commit 0dc4c572cf94edf81e0a2460d0aa82ca32eb24d7)

14 years agobuild fixes for tests on unix (cherry picked from commit 99f567e97f807a1270d01f972239...
Frank Osterfeld [Thu, 23 Apr 2009 10:15:33 +0000 (12:15 +0200)]
build fixes for tests on unix (cherry picked from commit 99f567e97f807a1270d01f97223941acd279dbf8)

14 years agomerge changes done to the cmake-buildsystem from the sf.net windbus-svn trunk. tested...
Christian Ehrlicher [Fri, 24 Apr 2009 09:36:50 +0000 (11:36 +0200)]
merge changes done to the cmake-buildsystem from the sf.net windbus-svn trunk. tested and works fine with at least msvc2008. (cherry picked from commit 45c168fd61e3f6447e014df4bb6417efbe725ccd)

14 years agofix deadlock when dbus-daemon could not start up
Christian Ehrlicher [Mon, 27 Apr 2009 11:41:48 +0000 (13:41 +0200)]
fix deadlock when dbus-daemon could not start up

windbus:r811: apply patch by Thorvald Natvig to fix endless loop when _dbus_get_autolaunch_shm got called and the dbus-daemon failed to start up.
* if launching for some reason fails, set an error message
* _dbus_get_autolaunch_shm will abort getting the shared memory after 20 attempts (2 seconds)
* _dbus_get_autolaunch_address checks if the return state of WaitForInputIdle before calling _dbus_get_autolaunch_shm.

windbus:r812: remove WaitForInputIdle as it doesn't work in non-console mode
(cherry picked from commit 363fd736556219bad77c4b217e051b7983dc34e9)

14 years agoall changes for dbus-1.2 API (cherry picked from commit 6734a3210a0705e3ab01ee123fac2...
Christian Ehrlicher [Mon, 30 Nov 2009 09:23:54 +0000 (10:23 +0100)]
all changes for dbus-1.2 API (cherry picked from commit 6734a3210a0705e3ab01ee123fac275799877353)

14 years agopatch from Thorvald Natvig to fix a copy+paste error that could result in a dangling...
Christian Ehrlicher [Fri, 24 Apr 2009 14:15:36 +0000 (16:15 +0200)]
patch from Thorvald Natvig to fix a copy+paste error that could result in a dangling handle at windows.

based on windbus:r773
 (cherry picked from commit 97d0f058527c62ce3a2203b1632e742b10d5b7a9)

14 years agono fake lock under Windows (cherry picked from commit 62cb039e40811a5881ee8dcc37c9710...
Peter Kümmel [Tue, 21 Nov 2006 19:51:13 +0000 (19:51 +0000)]
no fake lock under Windows (cherry picked from commit 62cb039e40811a5881ee8dcc37c97103a848f74d)

14 years agouse dbus_watch_get_socket in dbus_watch_get_unix_fd on windows (cherry picked from...
Christian Ehrlicher [Tue, 28 Apr 2009 14:29:49 +0000 (16:29 +0200)]
use dbus_watch_get_socket in dbus_watch_get_unix_fd on windows (cherry picked from commit c15206da8e56e32c7de98824d8d2c38a7d92c707)

14 years agoremove an assert for windows only - don't know why this was added... (cherry picked...
Christian Ehrlicher [Fri, 17 Apr 2009 12:37:41 +0000 (14:37 +0200)]
remove an assert for windows only - don't know why this was added... (cherry picked from commit a248de6b733f4a3a78f6646174d899ba2058395e)

14 years agohide console when autostarting dbus-daemon (cherry picked from commit 27fad960837b54b...
Ralf Habacker [Mon, 24 Dec 2007 08:42:31 +0000 (08:42 +0000)]
hide console when autostarting dbus-daemon (cherry picked from commit 27fad960837b54b6e47f408e6d1eecea1bee563f)

14 years agodbus/dbus-sysdeps-win.c: fix linking with mingw32
Marc Mutz [Mon, 20 Apr 2009 13:07:06 +0000 (15:07 +0200)]
dbus/dbus-sysdeps-win.c: fix linking with mingw32

* freeaddrinfo/getaddrinfo need _WIN32_WINNT to be 0x050_1_
(cherry picked from commit fa1f38452fafb841b7e2b36c7ca8918f9bde408f)

14 years agoInclude <stdlib.h> for envion on Windows (cherry picked from commit 5874d104f52a0ef4d...
Christian Ehrlicher [Mon, 27 Apr 2009 12:34:45 +0000 (14:34 +0200)]
Include <stdlib.h> for envion on Windows (cherry picked from commit 5874d104f52a0ef4d956ab56376776d3e385072f)

14 years agomsvc 8 compile++ and removed some stupid casts (cherry picked from commit 8c635b4a394...
Christian Ehrlicher [Wed, 1 Aug 2007 11:17:46 +0000 (11:17 +0000)]
msvc 8 compile++ and removed some stupid casts (cherry picked from commit 8c635b4a3944bcabc479718946e2a033d4c01489)

14 years agomingw compile++ , w2k-support++
Christian Ehrlicher [Fri, 9 May 2008 16:17:13 +0000 (16:17 +0000)]
mingw compile++ , w2k-support++

dbus/dbus-sysdeps-win.c: Don't unconditionally #include <wspiapi.h>

 * cmake/ConfigureChecks.cmake, cmake/config.h.cmake, configure.in:
   check for wspiapi.h presence which isn't available (and unneeded) in mingw32
 * dbus/dbus-sysdeps-win.c: use HAVE_WSPIAPI_H

15 years agoMerge branch 'monitor-ay-output'
Will Thompson [Thu, 5 Nov 2009 11:17:13 +0000 (11:17 +0000)]
Merge branch 'monitor-ay-output'

15 years agoPrint all-printable-ASCII byte arrays as strings
Will Thompson [Wed, 28 Oct 2009 19:40:38 +0000 (19:40 +0000)]
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.

15 years agoPrint byte arrays as nicely-formatted hex.
Will Thompson [Wed, 9 Sep 2009 19:58:53 +0000 (20:58 +0100)]
Print byte arrays as nicely-formatted hex.

15 years agoAdd an accessor for the loader's corruption reason
Will Thompson [Sat, 8 Aug 2009 13:29:12 +0000 (14:29 +0100)]
Add an accessor for the loader's corruption reason

15 years agoInclude reason when reporting corrupt messages
Will Thompson [Sat, 8 Aug 2009 12:57:11 +0000 (13:57 +0100)]
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".

15 years agoForbid zero serial numbers
Will Thompson [Sat, 8 Aug 2009 13:03:46 +0000 (14:03 +0100)]
Forbid zero serial numbers

15 years agoMake array-printing code easier to follow
Will Thompson [Wed, 9 Sep 2009 19:35:13 +0000 (20:35 +0100)]
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.

15 years agoCorrect timeout handling
James Westby [Thu, 1 Oct 2009 14:09:54 +0000 (15:09 +0100)]
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>
15 years agoFix compilation on non-Linux: the F_DUPFD_CLOEXEC check was reversed
Benjamin Reed [Wed, 22 Jul 2009 12:47:51 +0000 (08:47 -0400)]
Fix compilation on non-Linux: the F_DUPFD_CLOEXEC check was reversed

Signed-off-by: Thiago Macieira <thiago@kde.org>
15 years agomissing HAVE_UNIX_FD_PASSING check
Benjamin Reed [Wed, 22 Jul 2009 12:47:03 +0000 (08:47 -0400)]
missing HAVE_UNIX_FD_PASSING check

Signed-off-by: Thiago Macieira <thiago@kde.org>
15 years agoUpdate D-Bus version number to 1.3.1
Thiago Macieira [Wed, 29 Jul 2009 17:12:30 +0000 (19:12 +0200)]
Update D-Bus version number to 1.3.1

15 years agoGetting ready for D-Bus 1.3 dbus-1.3.0
Thiago Macieira [Wed, 29 Jul 2009 11:46:23 +0000 (13:46 +0200)]
Getting ready for D-Bus 1.3

15 years agoFix the configure-check again: must use b.
Thiago Macieira [Sat, 25 Jul 2009 11:21:01 +0000 (13:21 +0200)]
Fix the configure-check again: must use b.

Otherwise, when compiling with optimisation, the compiler will detect
that b was unused, then use the instructions that i386 supports.

15 years agoLong live D-Bus 1.3.x / 1.4.x.
Thiago Macieira [Thu, 16 Jul 2009 14:44:53 +0000 (16:44 +0200)]
Long live D-Bus 1.3.x / 1.4.x.

Library Age = 5 / Current = 8 indicates this development
series. Revision will increase from 0 after 1.4.0 is released.

15 years agoFix running tests when builddir != srcdir.
Thiago Macieira [Thu, 16 Jul 2009 14:35:22 +0000 (16:35 +0200)]
Fix running tests when builddir != srcdir.

This script is not deployed to the builddir, so it cannot be
run with relative paths.

15 years agoMerge branch 'fd-passing'
Thiago Macieira [Thu, 16 Jul 2009 14:05:16 +0000 (16:05 +0200)]
Merge branch 'fd-passing'

Conflicts:
dbus/dbus-connection.c
dbus/dbus-message-util.c
dbus/dbus-sysdeps-unix.c

15 years agoFix detection of the GCC __sync intrinsics.
Thiago Macieira [Thu, 16 Jul 2009 13:17:25 +0000 (15:17 +0200)]
Fix detection of the GCC __sync intrinsics.

We have to use the return value, otherwise GCC optimises the code
by using instructions that don't return anything. That won't
match what we actually use in dbus-sysdeps-unix.c

15 years agoMerge branch 'dbus-1.2'
Colin Walters [Wed, 15 Jul 2009 21:39:17 +0000 (17:39 -0400)]
Merge branch 'dbus-1.2'

Conflicts:
configure.in

15 years agoBug 22788 - Fix detection of getpwnam_r on Solaris
Brian Cameron [Wed, 15 Jul 2009 21:35:38 +0000 (17:35 -0400)]
Bug 22788 - Fix detection of getpwnam_r on Solaris

Define POSIX_PTHREAD_SEMANTICS earlier so more things use it.

Signed-off-by: Colin Walters <walters@verbum.org>
15 years agoUpdate the HACKING file to contain instructions on how we develop with Git
Thiago Macieira [Tue, 14 Jul 2009 20:35:11 +0000 (22:35 +0200)]
Update the HACKING file to contain instructions on how we develop with Git

15 years agoRelease 1.2.16 dbus-1.2.16
Colin Walters [Tue, 14 Jul 2009 20:11:27 +0000 (16:11 -0400)]
Release 1.2.16

15 years agoCope with dbus-launch not being in DBUS_BINDIR
Colin Walters [Tue, 14 Jul 2009 15:43:54 +0000 (11:43 -0400)]
Cope with dbus-launch not being in DBUS_BINDIR

This is a temporary hack for systems which use DBUS_BINDIR=/bin,
but then move dbus-launch back into /usr/bin.  Longer term,
we should explicitly support this in upstream code, or even better
figure out how to move dbus-launch into /bin (e.g. dynamically
load libX11 if available), or have a --with-x11-tools configure
option.
(cherry picked from commit 70c5285eb4b757fdd4e552e002c5d54072492152)

15 years agoBug 19432 - Fix handling of HAVE_CMSGCRED case (FreeBSD)
Hasso Tepper [Mon, 13 Jul 2009 18:23:40 +0000 (14:23 -0400)]
Bug 19432 - Fix handling of HAVE_CMSGCRED case (FreeBSD)

Fixes dbus on FreeBSD and DragonFly systems.

The patch is obtained from FreeBSD ports tree.

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 7bf132c7d15c1d8214b11442f053f7d53bca9a8f)

15 years agoBug 2432 - Support --address option for dbus-monitor
Daniel Reed [Mon, 13 Jul 2009 18:06:26 +0000 (14:06 -0400)]
Bug 2432 - Support --address option for dbus-monitor

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit e4b271e2425a36884b5e3e70e6a32d440b41d145)

15 years agoBug 19446 - HaikuOS support
Grzegorz Dąbrowski [Mon, 13 Jul 2009 17:53:38 +0000 (13:53 -0400)]
Bug 19446 - HaikuOS support

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 97c58ace430fb58cedfc1e5c83db9759063b6946)

15 years agoBug 16688 - typo in dbus-monitor.1
Paul Bolle [Mon, 13 Jul 2009 17:35:05 +0000 (13:35 -0400)]
Bug 16688 - typo in dbus-monitor.1

s/dbus_bus_add_watch/dbus_bus_add_match/

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 249f89181c4db5b15aab15472bb72402527434f5)

15 years agoBug 22415 - COYPING file should note we allow later versions of GPL
Colin Walters [Mon, 13 Jul 2009 17:11:20 +0000 (13:11 -0400)]
Bug 22415 - COYPING file should note we allow later versions of GPL

The canonical copyright information in the source file says we
allow later versions of the GPL.  So note that in COPYING too.
(cherry picked from commit f908daed82d61df44710a8ec681558c6d23b940d)

15 years agoBug 896 - Avoid race conditions reading message from exited process
Colin Walters [Sat, 11 Jul 2009 01:33:02 +0000 (21:33 -0400)]
Bug 896 - Avoid race conditions reading message from exited process

Patch based on extensive work from Michael Meeks <michael.meeks@novell.com>,
thanks to Dafydd Harries <dafydd.harries@collabora.co.uk>,
Kimmo Hämäläinen <kimmo.hamalainen@nokia.com> and others.

The basic idea with this bug is that we effectively ignore errors
on write.  Only when we're done reading from a connection do we
close down a connection.  This avoids a race condition where
if a process (such as dbus-send) exited while we still had
data to read in the buffer, we'd miss that data.
(cherry picked from commit 0e36cdd54964c4012acec2bb8e598b85e82d2846)

15 years agoBug 14259 - Refactor _dbus_get_autolaunch_address
Colin Walters [Mon, 13 Jul 2009 17:02:21 +0000 (13:02 -0400)]
Bug 14259 - Refactor _dbus_get_autolaunch_address

Split out the process-launching code, which can be reused for
other applications; in particular, a forthcoming patch to parse
output from launchd for MacOS X.
(cherry picked from commit 6b163e95e7a2318a98c16c0d0944337e38e62efa)

15 years agoBug 14259 - Make session address lookup system-dependent
Colin Walters [Mon, 13 Jul 2009 16:47:19 +0000 (12:47 -0400)]
Bug 14259 - Make session address lookup system-dependent

On some platforms such as MacOS X and Windows, we can't depend
on an environment variable to determine the address of the
session bus.  Create a sysdep function dbus_lookup_session_address
which can be filled in with platform-specific code.
(cherry picked from commit 6478ec6949c6bb794237b43d03b68f80eba1288c)

15 years agoBug 14259 - Work around broken getgrouplist on MacOS X
Benjamin Reed [Mon, 13 Jul 2009 15:21:08 +0000 (11:21 -0400)]
Bug 14259 - Work around broken getgrouplist on MacOS X

We don't get the number of groups, so allocate an arbitrary
larger array.

Signed-off-by: Colin Walters <walters@space-ghost.verbum.org>
(cherry picked from commit c71403ddde230378e3beffee21a3d1fe6edc9bce)

15 years agoBug 12484 - Ensure initialized variable in dbus_connection_remove_filter
Kimmo Hämäläinen [Mon, 13 Jul 2009 10:30:48 +0000 (06:30 -0400)]
Bug 12484 - Ensure initialized variable in dbus_connection_remove_filter

Signed-off-by: Colin Walters <walters@space-ghost.verbum.org>
(cherry picked from commit ccfa8e51549f36e09f90a4f5822523a0f50201fc)

15 years agoBug 18121 - Use a monotonic clock for pthread timeouts
Colin Walters [Sat, 11 Jul 2009 02:27:55 +0000 (22:27 -0400)]
Bug 18121 - Use a monotonic clock for pthread timeouts

Patch based on one from Keith Mok <ek9852@gmail.com>, some
followup work from Janne Karhunen <Janne.Karhunen@gmail.com>.

We don't want condition variable timeouts to be affected by the system clock.
Use the POSIX CLOCK_MONOTONIC if available.
(cherry picked from commit ae24bb35e2ee3ecde990f55852982b573754ec43)

15 years agoBug 22516 - Ensure inotify fd is set close on exec
Matthias Clasen [Sat, 11 Jul 2009 00:10:12 +0000 (20:10 -0400)]
Bug 22516 - Ensure inotify fd is set close on exec

This prevents it leaking into spawned child processes.

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit f4e15893e5be6da6c7642bb7ef9b14d5531afe41)

15 years agoBug 21545 - Move CFLAGS modification towards the end of configure
Colin Walters [Sat, 11 Jul 2009 00:07:34 +0000 (20:07 -0400)]
Bug 21545 - Move CFLAGS modification towards the end of configure

This prevents the flags from screwing up autoconf tests.
(cherry picked from commit 98bbe8c7941f2c643dc55b4e7329c0da57d2c7bc)

15 years agoEnsure messages are locked while marshalling.
Will Thompson [Sun, 7 Jun 2009 16:44:26 +0000 (17:44 +0100)]
Ensure messages are locked while marshalling.

Locking a message has the side-effect of updating the message's length
header. Previously, if dbus_message_marshal() was called on an unlocked
message, it could yield an invalid message (as discovered by Ben
Schwartz in <http://bugs.freedesktop.org/show_bug.cgi?id=19723>).
(cherry picked from commit 9f825271f9106c23fe51ab54abdb5156b7751014)

15 years agoBug 21657 - Fix configure checks for va_list in maintainer mode
Christian Persch (GNOME) [Fri, 10 Jul 2009 23:40:00 +0000 (19:40 -0400)]
Bug 21657 - Fix configure checks for va_list in maintainer mode

Include the right headers.
(cherry picked from commit fe86222d10f0b2532be314a58841db82b1f5887e)

15 years agoBug 21161 - Update the FSF address
Tobias Mueller [Fri, 10 Jul 2009 23:32:38 +0000 (19:32 -0400)]
Bug 21161 - Update the FSF address

No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 5baf2f856a9c6625993234855b07680da1c8916f)

15 years agoBug 21646 - Fix a signed char comparison
Colin Walters [Fri, 10 Jul 2009 23:26:52 +0000 (19:26 -0400)]
Bug 21646 - Fix a signed char comparison

Original suggested patch from Marc-Andre Lureau <marcandre.lureau@gmail.com>

Explicitly cast to unsigned char before we do comparisons.
(cherry picked from commit 1f6ac4deef91df3130c61525a2800e6b8a0ddcbf)