From 32069eb10477e5cc59d89615e7a2336dff29bc2f Mon Sep 17 00:00:00 2001 From: angt Date: Mon, 4 Apr 2016 20:05:33 +0000 Subject: [PATCH] Print tun device on STARTED and STOPPED too --- src/main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main.c b/src/main.c index acb49c4..8c6a8a3 100644 --- a/src/main.c +++ b/src/main.c @@ -362,12 +362,14 @@ int main (int argc, char **argv) if (mud_is_up(mud)) { if (!started) { - state("STARTED", NULL); + state("STARTED", tun_name); started = 1; } - } else if (started) { - state("STOPPED", NULL); - started = 0; + } else { + if (started) { + state("STOPPED", tun_name); + started = 0; + } } if (FD_ISSET(tun_fd, &rfds)) {