* dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
authorMichael Albinus <michael.albinus@gmx.de>
Mon, 7 May 2012 14:57:18 +0000 (16:57 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Mon, 7 May 2012 14:57:18 +0000 (16:57 +0200)
batch mode.

src/ChangeLog
src/dbusbind.c

index f581156..fcf5ef9 100644 (file)
@@ -1,3 +1,8 @@
+2012-05-07  Michael Albinus  <michael.albinus@gmx.de>
+
+       * dbusbind.c (XD_DEBUG_MESSAGE): Don't print message twice in
+       batch mode.
+
 2012-05-06  Chong Yidong  <cyd@gnu.org>
 
        * lisp.mk (lisp): Update.
        (xd_close_bus): Rename from Fdbus_close_bus.  Not needed on Lisp
        level.
        (Fdbus_init_bus): New optional arg PRIVATE.  Cache address.
-       Return number of recounts.
+       Return number of refcounts.
        (Fdbus_get_unique_name): Make stronger parameter check.
        (Fdbus_message_internal): New defun.
        (Fdbus_call_method, Fdbus_call_method_asynchronously)
index 0ea08d7..446d060 100644 (file)
@@ -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 {                                                                 \