]> git.pld-linux.org Git - packages/squid.git/blob - squid_hit_miss_mark.patch
- fix configure.in to silence autoconf/automake
[packages/squid.git] / squid_hit_miss_mark.patch
1 diff -ur squid-2.5.STABLE11.orig/src/client_side.c squid-2.5.STABLE11/src/client_side.c
2 --- squid-2.5.STABLE11.orig/src/client_side.c   2005-09-15 11:53:28.000000000 +0200
3 +++ squid-2.5.STABLE11/src/client_side.c        2005-09-26 13:41:06.749747464 +0200
4 @@ -2072,6 +2072,9 @@
5         /* Avoid copying to MemBuf for non-range requests */
6         /* Note, if we're here, then 'rep' is known to be NULL */
7         http->out.offset += body_size;
8 +       {   int tos=isTcpHit(http->log_type) ? 0 : 8;
9 +           setsockopt(fd,SOL_IP,IP_TOS,&tos,4);
10 +       }
11         comm_write(fd, buf, size, clientWriteBodyComplete, http, NULL);
12         /* NULL because clientWriteBodyComplete frees it */
13         return;
14 @@ -2129,6 +2132,9 @@
15      if (!http->request->range && http->request->method == METHOD_GET)
16         assert(check_size == size);
17      /* write */
18 +    {  int tos=isTcpHit(http->log_type) ? 0 : 8;
19 +       setsockopt(fd,SOL_IP,IP_TOS,&tos,4);
20 +    }
21      comm_write_mbuf(fd, mb, clientWriteComplete, http);
22      /* if we don't do it, who will? */
23      memFree(buf, MEM_CLIENT_SOCK_BUF);
24 diff -ur squid-2.5.STABLE11.orig/src/defines.h squid-2.5.STABLE11/src/defines.h
25 --- squid-2.5.STABLE11.orig/src/defines.h       2005-03-26 03:50:52.000000000 +0100
26 +++ squid-2.5.STABLE11/src/defines.h    2005-09-26 13:41:06.752747008 +0200
27 @@ -41,6 +41,8 @@
28  #define FALSE 0
29  #endif
30  
31 +#define SQUID_TCP_RCVBUF SQUID_TCP_SO_RCVBUF
32 +
33  #define ACL_NAME_SZ 32
34  #define BROWSERNAMELEN 128
35  
36 diff -ur squid-2.5.STABLE11.orig/src/ftp.c squid-2.5.STABLE11/src/ftp.c
37 --- squid-2.5.STABLE11.orig/src/ftp.c   2005-09-11 03:49:53.000000000 +0200
38 +++ squid-2.5.STABLE11/src/ftp.c        2005-09-26 13:41:06.756746400 +0200
39 @@ -1151,8 +1151,8 @@
40      ftpState->ctrl.freefunc = memFree4K;
41      ftpState->ctrl.size = 4096;
42      ftpState->ctrl.offset = 0;
43 -    ftpState->data.buf = xmalloc(SQUID_TCP_SO_RCVBUF);
44 -    ftpState->data.size = SQUID_TCP_SO_RCVBUF;
45 +    ftpState->data.buf = xmalloc(SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF);
46 +    ftpState->data.size = (SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF);
47      ftpState->data.freefunc = xfree;
48      ftpScheduleReadControlReply(ftpState, 0);
49  }
50 diff -ur squid-2.5.STABLE11.orig/src/http.c squid-2.5.STABLE11/src/http.c
51 --- squid-2.5.STABLE11.orig/src/http.c  2005-09-11 03:49:54.000000000 +0200
52 +++ squid-2.5.STABLE11/src/http.c       2005-09-26 13:43:12.138685448 +0200
53 @@ -557,13 +557,13 @@
54  httpReadReply(int fd, void *data)
55  {
56      HttpStateData *httpState = data;
57 -    LOCAL_ARRAY(char, buf, SQUID_TCP_SO_RCVBUF);
58 +    LOCAL_ARRAY(char, buf, SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF);
59      StoreEntry *entry = httpState->entry;
60      const request_t *request = httpState->request;
61      int len;
62      int bin;
63      int clen;
64 -    size_t read_sz = SQUID_TCP_SO_RCVBUF;
65 +    size_t read_sz = (SQUID_TCP_RCVBUF < SQUID_TCP_SO_RCVBUF ? SQUID_TCP_RCVBUF : SQUID_TCP_SO_RCVBUF);
66  #if DELAY_POOLS
67      delay_id delay_id;
68  #endif
This page took 0.032281 seconds and 3 git commands to generate.