]> git.meshlink.io Git - meshlink/commitdiff
Make sure the top command can be used more than once in tincctl's shell.
authorGuus Sliepen <guus@tinc-vpn.org>
Fri, 3 Aug 2012 12:17:02 +0000 (14:17 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Fri, 3 Aug 2012 12:17:02 +0000 (14:17 +0200)
src/top.c

index f14395e23872a926eeee0da656cb5eebb7ceaae8..5552895aab76754e1cb36dc9da15a69f1cdcb23e 100644 (file)
--- 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);