busctl: monitor - ignore the final NameLost message

Commit f5938e8ff3 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.
This commit is contained in:
Tom Gundersen 2017-05-25 16:10:37 +02:00
parent 0bf7d7cc88
commit d27d4637c8

View file

@ -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) {