]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug #2263: Custom log formats fail to log file sizes >2GB properly on 32-bit platforms
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 18 Mar 2008 12:22:30 +0000 (13:22 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 18 Mar 2008 12:22:30 +0000 (13:22 +0100)
Was partially addressed in squid-3, but only for one of several log format codes
involving object sizes..

src/access_log.cc

index 5382d4f5e320a5ea8f4f10a7673716dde76151d7..17b7a4ed903394c94eb5d0d2f8d27275d20a223c 100644 (file)
@@ -590,8 +590,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:
@@ -798,16 +799,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;