r358 - trunk/varnish-cache/bin/varnishlog

phk at projects.linpro.no phk at projects.linpro.no
Thu Jul 6 23:03:43 CEST 2006


Author: phk
Date: 2006-07-06 23:03:42 +0200 (Thu, 06 Jul 2006)
New Revision: 358

Modified:
   trunk/varnish-cache/bin/varnishlog/varnishlog.c
Log:
Also flush ordered after the long timeout.


Modified: trunk/varnish-cache/bin/varnishlog/varnishlog.c
===================================================================
--- trunk/varnish-cache/bin/varnishlog/varnishlog.c	2006-07-06 21:00:38 UTC (rev 357)
+++ trunk/varnish-cache/bin/varnishlog/varnishlog.c	2006-07-06 21:03:42 UTC (rev 358)
@@ -47,6 +47,7 @@
 		sbuf_finish(ob[u]);
 		if (sbuf_len(ob[u]))
 			printf("%s\n", sbuf_data(ob[u]));
+		sbuf_clear(ob[u]);
 	}
 }
 
@@ -188,9 +189,11 @@
 		if (r_opt == NULL) {
 			p = VSL_NextLog(loghead, &q);
 			if (p == NULL) {
-				if (w_opt == NULL)
+				if (w_opt == NULL) {
+					if (o_flag && ++v == 100)
+						clean_order();
 					fflush(stdout);
-				else if (++v == 100) {
+				} else if (++v == 100) {
 					fflush(wfile);
 					printf("\nFlushed\n");
 				}
@@ -207,8 +210,8 @@
 				break;
 			p = rbuf;
 		}
+		v = 0;
 		if (wfile != NULL) {
-			v = 0;
 			i = fwrite(p, 4 + p[1], 1, wfile);
 			if (i != 1)
 				perror(w_opt);




More information about the varnish-commit mailing list