From a7b3214454b482d99fe19c8c49abfc3ba8f3b7c2 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sat, 29 Mar 2008 18:02:24 +1200 Subject: [PATCH] Bug #2263: Custom log formats fail to log file sizes >2GB properly on 32-bit platforms Author: Henrik Nordstrom Was partially addressed in squid-3, but only for one of several log format codes involving object sizes.. --- src/access_log.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/access_log.cc b/src/access_log.cc index d763038dc5..3872e19749 100644 --- a/src/access_log.cc +++ b/src/access_log.cc @@ -587,8 +587,9 @@ accessLogCustom(AccessLogEntry * al, customlog * log) break; case LFT_TIME_SECONDS_SINCE_EPOCH: - outint = current_time.tv_sec; - doint = 1; + // some platforms store time in 32-bit, some 64-bit... + outoff = static_cast(current_time.tv_sec); + dooff = 1; break; case LFT_TIME_SUBSECOND: @@ -795,16 +796,16 @@ accessLogCustom(AccessLogEntry * al, customlog * log) break; case LFT_REPLY_HIGHOFFSET: - outint = static_cast(al->cache.highOffset); + outoff = al->cache.highOffset; - doint = 1; + dooff = 1; break; case LFT_REPLY_OBJECTSIZE: - outint = static_cast(al->cache.objectSize); + outoff = al->cache.objectSize; - doint = 1; + dooff = 1; break; -- 2.47.2