Commit graph

195 commits

Author SHA1 Message Date
Simon McVittie
638828526a Fix spelling/grammatical mistakes detected by Debian's lintian(1)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=38284
Reviewed-by: Lennart Poettering <lennart@poettering.net>
2011-07-28 11:05:43 +01:00
Simon McVittie
638a742a38 Use #!/bin/sh for run-with-tmp-session-bus.sh
It doesn't seem to have any bashisms, and bash isn't in /bin on *BSD.

Suggested by Timothy Redaelli.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=35880
2011-06-01 18:36:23 +01:00
Simon McVittie
cea055514a Check for X even if X11 autolaunching is disabled
DBUS_ENABLE_X11_AUTOLAUNCH obviously requires DBUS_BUILD_X11. However,
the converse is not true.

If DBUS_BUILD_X11 is defined, dbus-launch will be able to connect to
the X server to determine when the session ends; most distributors will
want this, but it can be disabled with the standard Autoconf option
--without-x.

If DBUS_ENABLE_X11_AUTOLAUNCH is *also* defined, dbus-launch and libdbus
will be willing to perform autolaunch. Again, most distributors will want
this, but it can be disabled with --disable-x11-autolaunch.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=19997
Reviewed-by: Colin Walters <walters@verbum.org>
2011-05-25 17:38:44 +01:00
Simon McVittie
c559ec0525 dbus-launch: pass_info: always free strings on OOM
This doesn't really do anything, because we're about to exit anyway, but
it placates static analysis tools.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
Bug-NB: NB#180486
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-05-25 16:13:19 +01:00
Simon McVittie
2ae391ccb3 dbus-send: remove minor dead code
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128
Reviewed-by: Cosimo Alfarano <cosimo.alfarano@collabora.co.uk>
2011-05-25 16:11:27 +01:00
Will Thompson
435ddb0df1 minotaur: bail if asked to monitor >1 bus
A coworker was just tripped up by `dbus-monitor --session --system` only
monitoring the system bus. This patch would have saved him reproducing a
tricky bug several times!

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=26548
Reviewed-by: Colin Walters <walters@verbum.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-04-29 15:42:18 +01:00
Simon McVittie
75cecfc374 Break up the monster conditional in config-parser so gcov can cope
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=10887
Reviewed-by: Colin Walters <walters@verbum.org>
2011-04-07 11:25:54 +01:00
Simon McVittie
9a97f82079 Import compiler.m4 and lcov.am from telepathy-glib, and use them to replace gcov
Reviewed-by: Colin Walters <walters@verbum.org>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=10887
2011-02-17 17:07:12 +00:00
Simon McVittie
a8302efd2c dbus-cleanup-sockets: free list of socket entries
Origin: vendor, Maemo
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=33128
Bug-NB: NB#180486
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-01-17 12:18:40 +00:00
Christian Dywan
916620ea96 Free session file early in dbus-launch
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
2011-01-05 14:55:42 +00:00
Christian Dywan
79b4e478d7 Check return value of XGetWindowProperty in x11_get_address
Reviewed-by: Thiago Macieira <thiago@kde.org>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
2011-01-05 14:42:45 +00:00
Mike McQuaid
2366423e97 Fix PROFILE_TIMED_FORMAT printf warning on OSX. 2010-12-04 01:42:41 +01:00
Will Thompson
75ef1d2ed4 Merge branch 'documentation-build-system' 2010-10-26 17:11:10 +01:00
Christian Dywan
b1f947da1a Free envvar and args in pass_info in the oom case 2010-10-05 13:47:07 +01:00
Will Thompson
46b9961be7 Move manpages to doc/
This will make integrating the building of HTML versions of these
manpages into the build system way easier, at the cost of keeping
manpages in a different directory to the source for the program they
describe. I think this is an acceptable trade-off.
2010-10-05 11:45:59 +01:00
Havoc Pennington
ade5c7ad33 fix some "unused result" warnings in dbus-launch and dbus-spawn
Needed to avoid -Werror
2010-09-06 19:30:42 +02:00
Ralf Habacker
cd815c347a Fixed compiler warnings. 2010-06-07 15:46:33 +02:00
Marcus Brinkmann
1af558a620 Fix _IOLBF for Windows CE and also define _IONBF if needed. 2010-05-12 14:59:45 +02:00
Ralf Habacker
892bb42550 Fixed assert raised with msvc 2008 on windows. 2010-05-10 22:57:48 +02:00
Ralf Habacker
da3578a1a7 Cleanup debug messages. 2010-05-03 11:56:40 +02:00
Marcus Brinkmann
f857bf034a Include strtoll.c and strtoull.c in distribution. 2010-04-14 08:23:29 +02:00
Marcus Brinkmann
5e4ef80e09 Add replacement functions strtoll/strtoull for dbus-send, mainly for Windows CE. 2010-04-13 21:08:10 +02:00
Marcus Brinkmann
f041773df2 Port dbus tools to Windows CE. 2010-04-13 20:58:20 +02:00
Colin Walters
df89cfeb38 Merge branch 'dbus-1.2'
Conflicts:
	bus/dispatch.c
	configure.in
	test/name-test/test-names.c
2010-03-22 14:39:56 -04:00
Colin Walters
3861cb42f4 [64 bit printf] Update to use DBUS_PID_FORMAT, print (omitted)
There were already defines for formatting pids and uids, so use those.

In the case where we don't have a format specifier for 64 bit, print
(omitted) in dbus-monitor.
2010-03-22 14:35:28 -04:00
Colin Walters
c93d3ec2ff Add DBUS_INT64_MODIFIER define, turn on -Wformat
https://bugs.freedesktop.org/show_bug.cgi?id=19195

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.
2010-03-22 13:58:56 -04:00
Marcus Brinkmann
dbecdeabb2 Consistently include <config.h> in all C source files and never in header files. 2010-03-19 20:11:48 +01:00
Ralf Habacker
46df8b52d9 linux compile fix 2010-02-26 08:37:53 +01:00
Marcus Brinkmann
f31bb2a749 Enable dbus-launch for Windows target. 2010-02-11 22:38:55 +01:00
Romain Pokrzywka
1cd84d8258 remove DBUS_DAEMON_EXECUTABLE_NAME, we already have DBUS_DAEMON_NAME, and use the specified name for the executable when building with cmake 2010-02-07 00:32:46 +01: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
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
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
Tor Lillqvist
459c19b9dd Avoid warnings on Windows
Remove unused functions, or put in #if 0 if potentially useful. Make
internal functions used just in one file static. Use -Werror after all
also on Windows. Construct the installation root from the location of
the dbus DLL, not from the location of the program .exe of the
process.
2009-12-01 10:27:54 +01:00
Nguyễn Thái Ngọc Duy
4c02c62621 remove dbus-uuidgen from Windows build (cherry picked from commit 73873e002ac9ba6159388b2c7b4190c30961ec68) 2009-12-01 08:38:02 +01:00
Marc Mutz
6bb37dc542 tools/Makefile.am: conditional compilation for W32 (cherry picked from commit 8b2f7581ef46b6e9bd29b8399657c039cb49f030) 2009-12-01 08:36:30 +01:00
Ralf Habacker
85efbce5d6 completed notes 2009-11-30 12:14:24 +01:00
Tor Lillqvist
b5c8483f44 tools/dbus-launch-win.c: TODO++ (cherry picked from commit 0f5dbec6407975d6a93fbb2cbcd58ab192961cf8) 2009-11-30 12:04:59 +01:00
Tor Lillqvist
14aca8b73b tools/dbus-launch-win.c: strrchr -> _mbsrchr (cherry picked from commit b8b9fc300242ff25071df4166173baae7d2b4f0f) 2009-11-30 12:00:17 +01:00
Tor Lillqvist
73749944e3 tools/dbus-launch-win.c: fix typo (cherry picked from commit 81a7a0e9309e5929857fdf44b8b51a4f8df097e6) 2009-11-30 12:00:14 +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
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
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
Sascha Silbe
9b2c196ef3 Bug 23977 - dbus-launch --exit-with-session not killing dbus-daemon on SIGINT
Handle SIGINT in the same way we handle SIGTERM.
2009-10-16 15:20:43 -04:00
Lennart Poettering
43b1f91865 dbus-monitor: use unbuffered stdout instead of handling SIGINT
The current SIGINT handling of dbus-monitor ain't making too many people
happy since it defers the exit to the next msg received -- which might
be quite some time away often enough.

This patch replaces the SIGINT handling by simply enabling line-buffered
IO for STDOUT so that even if you redirect dbus-monitor into a file no
lines get accidently lost and the effect of C-c is still immediate.

halfline came up with the great idea to use setvbuf here instead of
fflush()ing after each printf().

(Oh and the old signal handler was broken anyway, the flag should have
been of type sigatomic_t and be marked volatile)

Signed-off-by: Colin Walters <walters@verbum.org>
2009-07-31 12:27:48 -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
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
Tobias Mueller
dc33f4f774 Bug 21161 - Update the FSF address
No comment.

Signed-off-by: Colin Walters <walters@verbum.org>
(cherry picked from commit 5baf2f856a)
2009-07-14 15:39:47 -04:00