summaryrefslogtreecommitdiff
path: root/src/dbusbind.c
diff options
context:
space:
mode:
authorMichael Albinus <michael.albinus@gmx.de>2012-05-07 16:57:18 +0200
committerMichael Albinus <michael.albinus@gmx.de>2012-05-07 16:57:18 +0200
commit9a4b36f891acd6e620c1d7e6f3fcedc368003ee7 (patch)
treebffca03e95b57287051277f1f63a4ede36368d34 /src/dbusbind.c
parent1241b724c80c73731c7e5710a98886b745a211a8 (diff)
downloademacs-9a4b36f891acd6e620c1d7e6f3fcedc368003ee7.tar.gz
* dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
batch mode.
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index 0ea08d7bf0e..446d060c89b 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -111,12 +111,13 @@ static int xd_in_read_queued_messages = 0;
/* Macros for debugging. In order to enable them, build with
"env MYCPPFLAGS='-DDBUS_DEBUG -Wall' make". */
#ifdef DBUS_DEBUG
-#define XD_DEBUG_MESSAGE(...) \
- do { \
- char s[1024]; \
- snprintf (s, sizeof s, __VA_ARGS__); \
- printf ("%s: %s\n", __func__, s); \
- message ("%s: %s", __func__, s); \
+#define XD_DEBUG_MESSAGE(...) \
+ do { \
+ char s[1024]; \
+ snprintf (s, sizeof s, __VA_ARGS__); \
+ if (!noninteractive) \
+ printf ("%s: %s\n", __func__, s); \
+ message ("%s: %s", __func__, s); \
} while (0)
#define XD_DEBUG_VALID_LISP_OBJECT_P(object) \
do { \