From 6ed592ba780057f9b6b34a4bab19e9ab68d9f4a5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Stelmach?= Date: Tue, 12 Mar 2024 15:26:56 +0100 Subject: [PATCH] fixup! Generate graph from the traffic observable by busctl monitor. Change-Id: I74dd13254322d1cc3cb3f8e52c40d807f86f05f0 --- src/busctl/busctl.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index 4f6af0d..fab3a55 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -1390,6 +1390,8 @@ static int monitor(int argc, char *argv[], int (*dump)(sd_bus_message *m, FILE * return r; while (monitor_run_condi) { + _cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL; + receiver_pid_match = true; sender_pid_match = true; @@ -1400,7 +1402,8 @@ static int monitor(int argc, char *argv[], int (*dump)(sd_bus_message *m, FILE * bus, hashmap_pids, sd_bus_message_get_sender(m), - arg_sender_pid); + arg_sender_pid, + m); } if (arg_receiver_pid != 0) { @@ -1408,11 +1411,12 @@ static int monitor(int argc, char *argv[], int (*dump)(sd_bus_message *m, FILE * bus, hashmap_pids, sd_bus_message_get_destination(m), - arg_receiver_pid); + arg_receiver_pid, + m); } if ((!arg_pid && receiver_pid_match && sender_pid_match) || (arg_pid && (receiver_pid_match || sender_pid_match))) { - dump(m, stdout, hashmap_names, bus); + dump(m, stdout); } fflush(stdout); -- 2.7.4