|
|
a3e2b5 |
From 625795e6214ae7c7f0f7f35b2c1f53e1e173b1ad Mon Sep 17 00:00:00 2001
|
|
|
a3e2b5 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
|
a3e2b5 |
Date: Thu, 2 Aug 2018 00:46:20 +0200
|
|
|
a3e2b5 |
Subject: [PATCH] bus: do not print (null) if the message has unknown type
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
(cherry picked from commit e8fd7e4b5b5269377efc641a7da43850822c1250)
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
Resolves: #1696224
|
|
|
a3e2b5 |
---
|
|
|
a3e2b5 |
src/libsystemd/sd-bus/bus-dump.c | 10 ++++++++--
|
|
|
a3e2b5 |
1 file changed, 8 insertions(+), 2 deletions(-)
|
|
|
a3e2b5 |
|
|
|
a3e2b5 |
diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c
|
|
|
a3e2b5 |
index 3a28c7c6e3..2bd06053a6 100644
|
|
|
a3e2b5 |
--- a/src/libsystemd/sd-bus/bus-dump.c
|
|
|
a3e2b5 |
+++ b/src/libsystemd/sd-bus/bus-dump.c
|
|
|
a3e2b5 |
@@ -59,8 +59,14 @@ int bus_message_dump(sd_bus_message *m, FILE *f, unsigned flags) {
|
|
|
a3e2b5 |
"%s%s%s Type=%s%s%s Endian=%c Flags=%u Version=%u Priority=%"PRIi64,
|
|
|
a3e2b5 |
m->header->type == SD_BUS_MESSAGE_METHOD_ERROR ? ansi_highlight_red() :
|
|
|
a3e2b5 |
m->header->type == SD_BUS_MESSAGE_METHOD_RETURN ? ansi_highlight_green() :
|
|
|
a3e2b5 |
- m->header->type != SD_BUS_MESSAGE_SIGNAL ? ansi_highlight() : "", special_glyph(TRIANGULAR_BULLET), ansi_normal(),
|
|
|
a3e2b5 |
- ansi_highlight(), bus_message_type_to_string(m->header->type), ansi_normal(),
|
|
|
a3e2b5 |
+ m->header->type != SD_BUS_MESSAGE_SIGNAL ? ansi_highlight() : "",
|
|
|
a3e2b5 |
+ special_glyph(TRIANGULAR_BULLET),
|
|
|
a3e2b5 |
+ ansi_normal(),
|
|
|
a3e2b5 |
+
|
|
|
a3e2b5 |
+ ansi_highlight(),
|
|
|
a3e2b5 |
+ bus_message_type_to_string(m->header->type) ?: "(unknown)",
|
|
|
a3e2b5 |
+ ansi_normal(),
|
|
|
a3e2b5 |
+
|
|
|
a3e2b5 |
m->header->endian,
|
|
|
a3e2b5 |
m->header->flags,
|
|
|
a3e2b5 |
m->header->version,
|