[master] b0339d1 Initialise screen on startup
Federico G. Schwindt
fgsch at lodoss.net
Sat Sep 2 02:19:10 CEST 2017
commit b0339d14c93ef22adff283a4a4289ce6ce44946b
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Fri Sep 1 20:04:32 2017 +0100
Initialise screen on startup
Fixes #2409.
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index fa5c493..7d99c7e 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -1048,7 +1048,7 @@ do_curses(struct vsm *vd, double delay)
{
struct pollfd pollfd;
long t;
- int ch;
+ int ch, initial = 1;
double now;
struct vsm_fantom f_iter = VSM_FANTOM_NULL;
@@ -1068,14 +1068,13 @@ do_curses(struct vsm *vd, double delay)
make_windows();
doupdate();
- init_hitrate();
while (keep_running) {
- if (VSM_Status(vd) & (VSM_MGT_CHANGED|VSM_WRK_CHANGED)) {
+ if (initial ||
+ (VSM_Status(vd) & (VSM_MGT_CHANGED|VSM_WRK_CHANGED))) {
init_hitrate();
delete_pt_list();
build_pt_list(vd, &f_iter);
- rebuild = 1;
- redraw = 1;
+ initial = 0;
}
now = VTIM_mono();
More information about the varnish-commit
mailing list