From 9a4b36f891acd6e620c1d7e6f3fcedc368003ee7 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 7 May 2012 16:57:18 +0200 Subject: * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in batch mode. --- src/dbusbind.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/dbusbind.c') 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 { \ -- cgit v1.2.1