From: Tom Gundersen Date: Thu, 25 May 2017 14:10:37 +0000 (+0200) Subject: busctl: monitor - ignore the final NameLost message X-Git-Tag: v234~162^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6031%2Fhead;p=thirdparty%2Fsystemd.git busctl: monitor - ignore the final NameLost message Commit f5938e8ff3cf5b6fadd6b440b3b10fc0e5a64733 started dropping all messages before we become a monitor, but the last one was getting through. This drops also the last NameLost message, which indicatse the switch from a regular peer to a monitor. --- diff --git a/src/busctl/busctl.c b/src/busctl/busctl.c index 438e1ace930..b38d6c7267a 100644 --- a/src/busctl/busctl.c +++ b/src/busctl/busctl.c @@ -1166,10 +1166,10 @@ static int monitor(sd_bus *bus, char *argv[], int (*dump)(sd_bus_message *m, FIL if (r < 0) return log_error_errno(r, "Failed to read lost name: %m"); - if (!streq(name, unique_name)) - continue; + if (streq(name, unique_name)) + is_monitor = true; - is_monitor = true; + continue; } if (m) {