Support printing unix file descriptors in dbus-send/dbus-monitor
authorRobert Ancell <robert.ancell@canonical.com>
Fri, 18 Oct 2013 00:46:45 +0000 (13:46 +1300)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 27 Nov 2013 15:08:25 +0000 (15:08 +0000)
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=70592
Reviewed-by: Chengwei Yang <chengwei.yang@intel.com>
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
tools/dbus-print-message.c

index 75d00acab2a7e3d5dfbd19f4dd6789cf8e8690df..e0dd2da60c6a281d907d40feec842d3aa8ea2de1 100644 (file)
@@ -346,7 +346,15 @@ print_iter (DBusMessageIter *iter, dbus_bool_t literal, int depth)
            printf("}\n");
            break;
          }
-           
+
+       case DBUS_TYPE_UNIX_FD:
+         {
+           int fd;
+           dbus_message_iter_get_basic (iter, &fd);
+           printf ("unix fd %d\n", fd);
+           break;
+         }
+
        default:
          printf (" (dbus-monitor too dumb to decipher arg type '%c')\n", type);
          break;