Luigi Gangitano wrote:

Hi Hirling,
I've forwarded this bug to the upstream bugzilla, where it can be handled correctly.

Hello,

I have the attached short patch working well (no counter wraps after 6T of traffic) since May 28., hope it helps.

endre
diff -ru squid-2.6.20/src/stat.c squid-2.6.20.p/src/stat.c
--- squid-2.6.20/src/stat.c	2007-09-21 16:48:37.000000000 +0200
+++ squid-2.6.20.p/src/stat.c	2008-05-28 14:58:13.572515550 +0200
@@ -1145,12 +1145,12 @@
 	f->client_http.hits);
     storeAppendPrintf(sentry, "client_http.errors = %d\n",
 	f->client_http.errors);
-    storeAppendPrintf(sentry, "client_http.kbytes_in = %d\n",
-	(int) f->client_http.kbytes_in.kb);
-    storeAppendPrintf(sentry, "client_http.kbytes_out = %d\n",
-	(int) f->client_http.kbytes_out.kb);
-    storeAppendPrintf(sentry, "client_http.hit_kbytes_out = %d\n",
-	(int) f->client_http.hit_kbytes_out.kb);
+    storeAppendPrintf(sentry, "client_http.kbytes_in = %" PRINTF_OFF_T "\n",
+	f->client_http.kbytes_in.kb);
+    storeAppendPrintf(sentry, "client_http.kbytes_out = %" PRINTF_OFF_T "\n",
+	f->client_http.kbytes_out.kb);
+    storeAppendPrintf(sentry, "client_http.hit_kbytes_out = %" PRINTF_OFF_T "\n",
+	f->client_http.hit_kbytes_out.kb);
 
     storeAppendPrintf(sentry, "server.all.requests = %d\n",
 	(int) f->server.all.requests);

Reply via email to