]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #2263: Custom log formats fail to log file sizes >2GB properly on 32-bit platforms
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 29 Mar 2008 06:02:24 +0000 (18:02 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 29 Mar 2008 06:02:24 +0000 (18:02 +1200)
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

index d763038dc5d71107ff5d122953b5c8d867f315b9..3872e1974961864adc57895495d380aeed3d883d 100644 (file)
@@ -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<int64_t>(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<int>(al->cache.highOffset);
+            outoff = al->cache.highOffset;
 
-            doint = 1;
+            dooff = 1;
 
             break;
 
         case LFT_REPLY_OBJECTSIZE:
-            outint = static_cast<int>(al->cache.objectSize);
+            outoff = al->cache.objectSize;
 
-            doint = 1;
+            dooff = 1;
 
             break;