From: Guus Sliepen Date: Fri, 3 Aug 2012 12:17:02 +0000 (+0200) Subject: Make sure the top command can be used more than once in tincctl's shell. X-Git-Tag: release-1.1pre3~61 X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=commitdiff_plain;h=e29e0fee8812851473bcf24324a15cbf3cc854a0 Make sure the top command can be used more than once in tincctl's shell. --- diff --git a/src/top.c b/src/top.c index f14395e2..5552895a 100644 --- a/src/top.c +++ b/src/top.c @@ -59,7 +59,6 @@ static bool cumulative = false; static list_t node_list; static struct timeval now, prev, diff; static int delay = 1000; -static bool running = true; static bool changed = true; static const char *unit = "bytes"; static float scale = 1; @@ -247,6 +246,7 @@ static void redraw(void) { void top(int fd) { initscr(); timeout(delay); + bool running = true; while(running) { update(fd);