]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Reverted some changes from r10263
authorFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 13 Jul 2010 14:27:25 +0000 (16:27 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Tue, 13 Jul 2010 14:27:25 +0000 (16:27 +0200)
src/client_side_reply.cc

index 26043b9967471ba6428ad40fd39954e888d87503..fdf31850691eff28a6c14f2d162b186f04c63af6 100644 (file)
@@ -1056,6 +1056,24 @@ clientReplyContext::storeNotOKTransferDone() const
 int
 clientHttpRequestStatus(int fd, ClientHttpRequest const *http)
 {
+#if SIZEOF_INT64_T == 4
+    if (http->out.size > 0x7FFF0000) {
+        debugs(88, 1, "WARNING: closing FD " << fd << " to prevent out.size counter overflow");
+        debugs(88, 1, "\tclient " << http->getConn()->peer);
+        debugs(88, 1, "\treceived " << http->out.size << " bytes");
+        debugs(88, 1, "\tURI " << http->log_uri);
+        return 1;
+    }
+
+    if (http->out.offset > 0x7FFF0000) {
+        debugs(88, 1, "WARNING: closing FD " << fd < " to prevent out.offset counter overflow");
+        debugs(88, 1, "\tclient " << http->getConn()->peer);
+        debugs(88, 1, "\treceived " << http->out.size << " bytes, offset " << http->out.offset);
+        debugs(88, 1, "\tURI " << http->log_uri);
+        return 1;
+    }
+
+#endif
     return 0;
 }