| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit e4b271e2425a36884b5e3e70e6a32d440b41d145)
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 97c58ace430fb58cedfc1e5c83db9759063b6946)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
s/dbus_bus_add_watch/dbus_bus_add_match/
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 249f89181c4db5b15aab15472bb72402527434f5)
|
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | | |
Signed-off-by: Colin Walters <walters@space-ghost.verbum.org>
(cherry picked from commit ccfa8e51549f36e09f90a4f5822523a0f50201fc)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This prevents it leaking into spawned child processes.
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit f4e15893e5be6da6c7642bb7ef9b14d5531afe41)
|
| | |
| | |
| | |
| | |
| | | |
This prevents the flags from screwing up autoconf tests.
(cherry picked from commit 98bbe8c7941f2c643dc55b4e7329c0da57d2c7bc)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | | |
Include the right headers.
(cherry picked from commit fe86222d10f0b2532be314a58841db82b1f5887e)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
No comment.
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 5baf2f856a9c6625993234855b07680da1c8916f)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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)
|
| | |
| | |
| | |
| | |
| | | |
We use usleep here.
(cherry picked from commit e5310abd6cbc4c2e1a9df54f097d6642ad0833c6)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If other code in the process set a global SIGCHLD handler, it
will make autolaunching fail spuriously due to waitpid() failing.
This fix will temporarily block SIGCHLD delivery.
Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 644fc38b249b490981becda4b2de5261865bba23)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In case of OOM when constructing an array, we should abandon the
container to free the resources.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit 3f070088232f82fafce97c4fb3015da098fe00bf)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's not currently possible to abandon creation of a container without
either hitting asserts or leaking memory. This new function allows
that.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit e57a368c440aec39caf6c3b491cf76ef615dc2e8)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* dbus/dbus-message-util.c: when constructing an array of structures,
it's not possible to unwind in case of an error part-way through.
This test will therefore assert.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit 4bea3ca2b02098f2513a9902511e4de77ccf9b91)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* test/test-service.c (handle_delay_echo, path_message_func): Add a
variant of the Echo method which sleeps for a short time.
* test/name-test/test-pending-call-timeout.c: Run tests with default,
specified and infinite timeout to make sure we get the reply.
* test/name-test/run-test.sh: Run the new test
* test/name-test/Makefile.am: Build the new test
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit c1f165261afcc3bafa9b24ff916bb231628e3782)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* bus/session.conf.in: Remove the reply_timeout stanza, previously
intended to increase the reply timeout, this now reduces it.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit bd2063e17e1bb57dee1a5dfed76c9dde76d55ff3)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* bus/config-parser.c (bus_config_parser_new): change the default reply
timeout to "never"
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit 8f1d2a2fa8ba2f25121465ad82289c0e09c9675a)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* bus/expirelist.c (do_expiration_with_current_time): Don't check for
expiry if expire_after is negative, will just disable the expiry timer
after the call.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit d672d0320628e93a247eeff89945c81926a42163)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* bus/expirelist.c (do_expiration_with_current_time): If the item added
time fields are both zero, always expire.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit d33cfec625bf769384cc370ad0ea660c9993aa15)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* dbus/dbus-pending-call.c (_dbus_pending_call_new_unlocked): Now that
the timeout math won't overflow, don't clamp to six hours.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit 7398ad7374c0a9201d41397c956deee325f3593e)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* dbus/dbus-connection.c (_dbus_connection_block_pending_call): Rework
the timeout math so instead of calculating an end time, which may
overflow, we instead calculate the elapsed time which is always
smaller than the boundaries.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit 1faa92114f6489d286ad4cebe5e91b2145a4f7d1)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* dbus/dbus-connection.c (dbus_connection_send_with_reply): Fix
documentation now that INT_MAX will not be clamped.
(dbus_connection_send_with_reply_and_block): Update documentation too.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit ce0d932d9be5adec22943dd7b268bd4a165ada64)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* dbus/dbus-pending-call.c (_dbus_pending_call_new_unlocked): When passed
INT_MAX, do not clamp the value and do not allocate a timeout for the call
(_dbus_pending_call_get_timeout_unlocked): Document that this may return
NULL.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit 92dd55c903b440bc423f1f8f9aeb0bbbbcc11bac)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* dbus/dbus-connection.c (_dbus_connection_block_pending_call): Allow the
pending call to have no timeout, in which case we simply block until we
complete, have data or get disconnected.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit e5eb472d11aa36c67e320edce41d66eb18cdf5d0)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* dbus/dbus-connection.c (_dbus_connection_attach_pending_call_unlocked):
Don't assume that the pending call has a timeout.
(connection_timeout_and_complete_all_pending_call_unlocked): check that
the timeout was actually added before removing it; this safeguards us
if the pending call doesn't have a timeout.
Signed-off-by: Scott James Remnant <scott@ubuntu.com>
(cherry picked from commit ba22606c3b21c55c5c0af30d8f07edd71ded7213)
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Fixes dbus on FreeBSD and DragonFly systems.
The patch is obtained from FreeBSD ports tree.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
s/dbus_bus_add_watch/dbus_bus_add_match/
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | |
| | |
| | |
| | |
| | | |
The canonical copyright information in the source file says we
allow later versions of the GPL. So note that in COPYING too.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't get the number of groups, so allocate an arbitrary
larger array.
Signed-off-by: Colin Walters <walters@space-ghost.verbum.org>
|
| | |
| | |
| | |
| | | |
Signed-off-by: Colin Walters <walters@space-ghost.verbum.org>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
This prevents it leaking into spawned child processes.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | |
| | |
| | |
| | | |
This prevents the flags from screwing up autoconf tests.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>).
|
| | |
| | |
| | |
| | | |
Include the right headers.
|
| | |
| | |
| | |
| | |
| | |
| | | |
No comment.
Signed-off-by: Colin Walters <walters@verbum.org>
|
| | |
| | |
| | |
| | |
| | |
| | | |
Original suggested patch from Marc-Andre Lureau <marcandre.lureau@gmail.com>
Explicitly cast to unsigned char before we do comparisons.
|