[master] 83196f4 Stop updating counters after hitting EOF

Martin Blix Grydeland martin at varnish-software.com
Thu Jan 30 14:02:09 CET 2014


commit 83196f45f6d9d44ee127f38b6889fa36146b2a71
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Thu Jan 30 13:53:42 2014 +0100

    Stop updating counters after hitting EOF

diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index 3bb12b3..761c3f3 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -220,7 +220,8 @@ update(int p)
 				len, len, tp->rec_data));
 			t = tp->count;
 		}
-		(void)t;
+		if (end_of_file)
+			continue;
 		tp->count += (1.0/3.0 - tp->count) / (double)n;
 		if (tp->count * 10 < t || l > LINES * 10) {
 			VRB_REMOVE(top_tree, &top_tree_head, tp);



More information about the varnish-commit mailing list