]>
Commit | Line | Data |
---|---|---|
91e92d0a | 1 | --- squid-2.6.STABLE5.orig/src/client_side.c 2006-09-30 23:10:48.000000000 +0200 |
41c7a9fd | 2 | +++ squid-2.6.STABLE5/src/client_side.c 2006-11-14 18:26:59.459231147 +0100 |
3 | @@ -3000,6 +3000,9 @@ | |
91e92d0a | 4 | if (!http->request->range) { |
5 | /* Avoid copying to MemBuf for non-range requests */ | |
6 | http->out.offset += size; | |
41c7a9fd | 7 | + { int tos=isTcpHit(http->log_type) ? 0 : 8; |
8 | + setsockopt(fd,SOL_IP,IP_TOS,&tos,4); | |
9 | + } | |
91e92d0a | 10 | comm_write(fd, buf, size, clientWriteBodyComplete, http, NULL); |
11 | /* NULL because clientWriteBodyComplete frees it */ | |
12 | return; | |
41c7a9fd | 13 | @@ -3034,6 +3037,9 @@ |
14 | memBufAppend(&mb, buf, size); | |
15 | } | |
16 | /* write */ | |
17 | + { int tos=isTcpHit(http->log_type) ? 0 : 8; | |
18 | + setsockopt(fd,SOL_IP,IP_TOS,&tos,4); | |
19 | + } | |
20 | comm_write_mbuf(fd, mb, clientWriteComplete, http); | |
21 | /* if we don't do it, who will? */ | |
22 | memFree(buf, MEM_CLIENT_SOCK_BUF); | |
91e92d0a | 23 | diff -urN squid-2.6.STABLE5.orig/src/defines.h squid-2.6.STABLE5/src/defines.h |
24 | --- squid-2.6.STABLE5.orig/src/defines.h 2006-08-19 14:40:31.000000000 +0200 | |
25 | +++ squid-2.6.STABLE5/src/defines.h 2006-11-13 21:15:47.563667677 +0100 | |
30a5a2e5 | 26 | @@ -41,6 +41,8 @@ |
27 | #define FALSE 0 | |
28 | #endif | |
29 | ||
30 | +#define SQUID_TCP_RCVBUF SQUID_TCP_SO_RCVBUF | |
31 | + | |
91e92d0a | 32 | /* Define load weights for cache_dir types */ |
33 | #define MAX_LOAD_VALUE 1000 | |
30a5a2e5 | 34 | |
91e92d0a | 35 | diff -urN squid-2.6.STABLE5.orig/src/ftp.c squid-2.6.STABLE5/src/ftp.c |
36 | --- squid-2.6.STABLE5.orig/src/ftp.c 2006-09-19 01:03:36.000000000 +0200 | |
37 | +++ squid-2.6.STABLE5/src/ftp.c 2006-11-13 21:16:59.616675539 +0100 | |
38 | @@ -1152,7 +1152,7 @@ | |
39 | ftpState->ctrl.last_command = xstrdup("Connect to server"); | |
40 | ftpState->ctrl.buf = memAllocBuf(4096, &ftpState->ctrl.size); | |
30a5a2e5 | 41 | ftpState->ctrl.offset = 0; |
91e92d0a | 42 | - ftpState->data.buf = memAllocBuf(SQUID_TCP_SO_RCVBUF, &ftpState->data.size); |
43 | + ftpState->data.buf = memAllocBuf(SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF, &ftpState->data.size); | |
30a5a2e5 | 44 | ftpScheduleReadControlReply(ftpState, 0); |
45 | } | |
91e92d0a | 46 | |
47 | diff -urN squid-2.6.STABLE5.orig/src/http.c squid-2.6.STABLE5/src/http.c | |
48 | --- squid-2.6.STABLE5.orig/src/http.c 2006-10-23 23:34:17.000000000 +0200 | |
49 | +++ squid-2.6.STABLE5/src/http.c 2006-11-13 21:19:13.214294384 +0100 | |
50 | @@ -622,14 +622,14 @@ | |
30a5a2e5 | 51 | httpReadReply(int fd, void *data) |
52 | { | |
53 | HttpStateData *httpState = data; | |
54 | - LOCAL_ARRAY(char, buf, SQUID_TCP_SO_RCVBUF); | |
55 | + LOCAL_ARRAY(char, buf, SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF); | |
56 | StoreEntry *entry = httpState->entry; | |
57 | const request_t *request = httpState->request; | |
91e92d0a | 58 | const request_t *orig_request = httpState->orig_request; |
30a5a2e5 | 59 | int len; |
60 | int bin; | |
61 | int clen; | |
62 | - size_t read_sz = SQUID_TCP_SO_RCVBUF; | |
63 | + size_t read_sz = (SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF); | |
91e92d0a | 64 | struct in_addr *client_addr = NULL; |
65 | u_short client_port = 0; | |
30a5a2e5 | 66 | #if DELAY_POOLS |