]> git.pld-linux.org Git - packages/squid.git/blame - squid-2.5.STABLE4-pconn-lifo.patch
- grant stats user (statistics generators) access to squid logs
[packages/squid.git] / squid-2.5.STABLE4-pconn-lifo.patch
CommitLineData
684396e0
AM
1Index: squid/src/pconn.c
2diff -c squid/src/pconn.c:1.31.2.1 squid/src/pconn.c:1.31.2.2
3*** squid/src/pconn.c:1.31.2.1 Sun Dec 14 05:30:36 2003
4--- squid/src/pconn.c Mon Dec 15 16:38:43 2003
5***************
6*** 95,105 ****
7 pconnRemoveFD(struct _pconn *p, int fd)
8 {
9 int i;
10! for (i = 0; i < p->nfds; i++) {
11 if (p->fds[i] == fd)
12 break;
13 }
14! assert(i < p->nfds);
15 debug(48, 3) ("pconnRemoveFD: found FD %d at index %d\n", fd, i);
16 for (; i < p->nfds - 1; i++)
17 p->fds[i] = p->fds[i + 1];
18--- 95,105 ----
19 pconnRemoveFD(struct _pconn *p, int fd)
20 {
21 int i;
22! for (i = p->nfds - 1; i >= 0; i--) {
23 if (p->fds[i] == fd)
24 break;
25 }
26! assert(i >= 0);
27 debug(48, 3) ("pconnRemoveFD: found FD %d at index %d\n", fd, i);
28 for (; i < p->nfds - 1; i++)
29 p->fds[i] = p->fds[i + 1];
30***************
31*** 235,241 ****
32 if (hptr != NULL) {
33 p = (struct _pconn *) hptr;
34 assert(p->nfds > 0);
35! fd = p->fds[0];
36 pconnRemoveFD(p, fd);
37 commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
38 commSetTimeout(fd, -1, NULL, NULL);
39--- 235,241 ----
40 if (hptr != NULL) {
41 p = (struct _pconn *) hptr;
42 assert(p->nfds > 0);
43! fd = p->fds[p->nfds - 1];
44 pconnRemoveFD(p, fd);
45 commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0);
46 commSetTimeout(fd, -1, NULL, NULL);
This page took 0.040853 seconds and 4 git commands to generate.