Commit graph

2197 commits

Author SHA1 Message Date
Frank Osterfeld
2feb3e2e65 add check for abstract sockets (cherry picked from commit 5b657984f4bc5544a8df560adcd224ed243972f1) 2009-11-30 10:54:32 +01:00
Frank Osterfeld
7fac18bd15 be more verbose when locking the mutex fails (cherry picked from commit 4a14a050c4be026c7b9d67fd1f47c8479edebfc4) 2009-11-30 10:50:22 +01:00
Frank Osterfeld
09078aa134 do not call functions with side-effects inside assert (cherry picked from commit 0d0f443564403fedffd0450bed377230511ba0d7) 2009-11-30 10:50:21 +01:00
Frank Osterfeld
ff92d15f94 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)
2009-11-30 10:50:20 +01:00
Frank Osterfeld
45f8e734af set -DDBUS_BUILD_TESTS remove -g, it's already set via CMAKE_BUILD_TYPE (cherry picked from commit 0dc4c572cf94edf81e0a2460d0aa82ca32eb24d7) 2009-11-30 10:50:19 +01:00
Frank Osterfeld
eb96d81eca build fixes for tests on unix (cherry picked from commit 99f567e97f807a1270d01f97223941acd279dbf8) 2009-11-30 10:50:18 +01:00
Christian Ehrlicher
4668480458 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) 2009-11-30 10:32:04 +01:00
Christian Ehrlicher
a83b7cb80c 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)
2009-11-30 10:32:04 +01:00
Christian Ehrlicher
722a90c9cb all changes for dbus-1.2 API (cherry picked from commit 6734a3210a0705e3ab01ee123fac275799877353) 2009-11-30 10:23:54 +01:00
Christian Ehrlicher
e73985bb14 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)
2009-11-30 10:17:50 +01:00
Peter Kümmel
7c62f972f3 no fake lock under Windows (cherry picked from commit 62cb039e40811a5881ee8dcc37c97103a848f74d) 2009-11-30 10:17:50 +01:00
Christian Ehrlicher
54ebd0acd8 use dbus_watch_get_socket in dbus_watch_get_unix_fd on windows (cherry picked from commit c15206da8e56e32c7de98824d8d2c38a7d92c707) 2009-11-30 10:17:49 +01:00
Christian Ehrlicher
b40c43b8e2 remove an assert for windows only - don't know why this was added... (cherry picked from commit a248de6b733f4a3a78f6646174d899ba2058395e) 2009-11-29 19:35:34 +01:00
Ralf Habacker
2f19833cbf hide console when autostarting dbus-daemon (cherry picked from commit 27fad960837b54b6e47f408e6d1eecea1bee563f) 2009-11-29 19:35:34 +01:00
Marc Mutz
ed3df419fe dbus/dbus-sysdeps-win.c: fix linking with mingw32
* freeaddrinfo/getaddrinfo need _WIN32_WINNT to be 0x050_1_
(cherry picked from commit fa1f38452fafb841b7e2b36c7ca8918f9bde408f)
2009-11-29 19:32:47 +01:00
Christian Ehrlicher
443f7a036a Include <stdlib.h> for envion on Windows (cherry picked from commit 5874d104f52a0ef4d956ab56376776d3e385072f) 2009-11-29 19:30:39 +01:00
Christian Ehrlicher
84401ec697 msvc 8 compile++ and removed some stupid casts (cherry picked from commit 8c635b4a3944bcabc479718946e2a033d4c01489) 2009-11-29 19:20:49 +01:00
Christian Ehrlicher
452ff68a2d 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
2009-11-29 19:06:22 +01:00
Will Thompson
8770f444fd Merge branch 'monitor-ay-output' 2009-11-05 11:17:13 +00:00
Will Thompson
80f6ebfef5 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.
2009-11-04 09:27:53 +00:00
Will Thompson
4d7968c06f Print byte arrays as nicely-formatted hex. 2009-11-04 09:27:49 +00:00
Will Thompson
ae94a89c44 Add an accessor for the loader's corruption reason 2009-11-01 14:32:35 +00:00
Will Thompson
6b240a12e2 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".
2009-11-01 14:32:35 +00:00
Will Thompson
7689d71257 Forbid zero serial numbers 2009-11-01 14:32:34 +00:00
Will Thompson
1e14e409a4 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.
2009-11-01 13:46:45 +00:00
James Westby
03cc20707a 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>
2009-10-01 15:09:54 +01:00
Benjamin Reed
a8cf509a06 Fix compilation on non-Linux: the F_DUPFD_CLOEXEC check was reversed
Signed-off-by: Thiago Macieira <thiago@kde.org>
2009-07-29 19:13:26 +02:00
Benjamin Reed
c1a31b6b30 missing HAVE_UNIX_FD_PASSING check
Signed-off-by: Thiago Macieira <thiago@kde.org>
2009-07-29 19:12:49 +02:00
Thiago Macieira
33b8cc30ba Update D-Bus version number to 1.3.1 2009-07-29 19:12:30 +02:00
Thiago Macieira
acf0eb52ad Getting ready for D-Bus 1.3 2009-07-29 14:14:32 +02:00
Thiago Macieira
3c99e692c9 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.
2009-07-25 13:21:01 +02:00
Thiago Macieira
24f55fa8cc 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.
2009-07-16 16:44:53 +02:00
Thiago Macieira
4a342d711f Fix running tests when builddir != srcdir.
This script is not deployed to the builddir, so it cannot be
run with relative paths.
2009-07-16 16:35:22 +02:00
Thiago Macieira
37019e9d27 Merge branch 'fd-passing'
Conflicts:
	dbus/dbus-connection.c
	dbus/dbus-message-util.c
	dbus/dbus-sysdeps-unix.c
2009-07-16 16:05:16 +02:00
Thiago Macieira
9f06daccce 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
2009-07-16 16:00:57 +02:00
Colin Walters
56f7ce147e Merge branch 'dbus-1.2'
Conflicts:
	configure.in
2009-07-15 17:39:17 -04:00
Brian Cameron
c6992fc56c 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>
2009-07-15 17:35:38 -04:00
Thiago Macieira
bb189fdb75 Update the HACKING file to contain instructions on how we develop with Git 2009-07-14 22:46:20 +02:00
Colin Walters
557968d8d6 Release 1.2.16 2009-07-14 16:11:27 -04:00
Colin Walters
3028841a74 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 70c5285eb4)
2009-07-14 15:42:38 -04:00
Hasso Tepper
5abb8aeb5e 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 7bf132c7d1)
2009-07-14 15:42:31 -04:00
Daniel Reed
fceaa7a153 Bug 2432 - Support --address option for dbus-monitor
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit e4b271e242)
2009-07-14 15:42:25 -04:00
Grzegorz Dąbrowski
ddc553326e Bug 19446 - HaikuOS support
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 97c58ace43)
2009-07-14 15:42:19 -04:00
Paul Bolle
3ee885f217 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 249f89181c)
2009-07-14 15:42:11 -04:00
Colin Walters
a96f2615c7 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 f908daed82)
2009-07-14 15:42:05 -04:00
Colin Walters
87ddff6b24 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 0e36cdd549)
2009-07-14 15:41:57 -04:00
Colin Walters
96e785bb06 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 6b163e95e7)
2009-07-14 15:41:48 -04:00
Colin Walters
44062b35af 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 6478ec6949)
2009-07-14 15:41:40 -04:00
Benjamin Reed
8420a5bb57 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 c71403ddde)
2009-07-14 15:41:33 -04:00
Kimmo Hämäläinen
93023eb6a4 Bug 12484 - Ensure initialized variable in dbus_connection_remove_filter
Signed-off-by: Colin Walters <walters@space-ghost.verbum.org>
(cherry picked from commit ccfa8e5154)
2009-07-14 15:40:31 -04:00