[4.1] 4f9d556 Be consistent wrt vsl_ts locking

PÃ¥l Hermunn Johansen hermunn at varnish-software.com
Mon Sep 12 15:48:16 CEST 2016


commit 4f9d5565fa738d1617159f437770c1e2a1619823
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Mon Aug 8 14:37:04 2016 +0200

    Be consistent wrt vsl_ts locking
    
    Fix an issue where the new timestamp was set without locking.
    
    Spotted by: Coverity

diff --git a/bin/varnishhist/varnishhist.c b/bin/varnishhist/varnishhist.c
index ec99a50..4a82cef 100644
--- a/bin/varnishhist/varnishhist.c
+++ b/bin/varnishhist/varnishhist.c
@@ -310,6 +310,12 @@ accumulate(struct VSL_data *vsl, struct VSL_transaction * const pt[],
 		if (tsp)
 			upd_vsl_ts(tsp);
 
+		/*
+		 * only parse the last tsp seen in this transaction -
+		 * it should be the latest.
+		 */
+		upd_vsl_ts(tsp);
+
 		/* phase out old data */
 		if (nhist == HIST_N) {
 			u = rr_hist[next_hist];



More information about the varnish-commit mailing list