[4.0] 4492226 Apply VSL_Match on records.

Martin Blix Grydeland martin at varnish-software.com
Thu Mar 13 10:24:22 CET 2014


commit 44922267c8fbea587e3143c13a635c71d25bb338
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Jan 29 11:45:43 2014 +0100

    Apply VSL_Match on records.
    
    This allows using the -ixIX options to filter which records are counted.

diff --git a/bin/varnishtop/varnishtop.c b/bin/varnishtop/varnishtop.c
index ed56833..65aa6a9 100644
--- a/bin/varnishtop/varnishtop.c
+++ b/bin/varnishtop/varnishtop.c
@@ -120,12 +120,14 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
 	unsigned tag;
 	const char *b, *e, *p;
 	unsigned len;
+	struct VSL_transaction *tr;
 
-	(void)vsl;
 	(void)priv;
-	struct VSL_transaction *tr;
+
 	for (tr = pt[0]; tr != NULL; tr = *++pt) {
 		while ((1 == VSL_Next(tr->c))) {
+			if (!VSL_Match(vsl, tr->c))
+				continue;
 			tag = VSL_TAG(tr->c->rec.ptr);
 			b = VSL_CDATA(tr->c->rec.ptr);
 			len = VSL_LEN(tr->c->rec.ptr);



More information about the varnish-commit mailing list