r2147 - in branches/1.1: . bin/varnishd
des at projects.linpro.no
des at projects.linpro.no
Fri Oct 19 13:42:26 CEST 2007
Author: des
Date: 2007-10-19 13:42:26 +0200 (Fri, 19 Oct 2007)
New Revision: 2147
Modified:
branches/1.1/
branches/1.1/bin/varnishd/cache.h
branches/1.1/bin/varnishd/cache_backend.c
branches/1.1/bin/varnishd/cache_fetch.c
branches/1.1/bin/varnishd/cache_pipe.c
Log:
Merged revisions 1889 via svnmerge from
svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache
........
r1889 | phk | 2007-08-20 13:05:48 +0200 (Mon, 20 Aug 2007) | 3 lines
Remove the unnecessary third argument to VBE_ClosedFd() and remove
a couple of now pointless debugging messages in pipe mode.
........
Property changes on: branches/1.1
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2078-2079,2088,2097,2106-2107,2133
+ /trunk/varnish-cache:1-1722,1727-1729,1733,1738,1743-1777,1779-1798,1800-1815,1817,1819,1823,1830-1838,1846,1853-1855,1857-1859,1862,1865-1868,1871-1880,1883-1884,1886,1888-1889,1896,1898,1902-1905,1907,1909,1912-1916,1920-1928,1935-1939,1941-1949,1955,1957-1958,1967-1968,1970-1974,1976-1977,1984,1986-1989,1991-1998,2026,2031-2033,2078-2079,2088,2097,2106-2107,2133
Modified: branches/1.1/bin/varnishd/cache.h
===================================================================
--- branches/1.1/bin/varnishd/cache.h 2007-10-19 11:36:35 UTC (rev 2146)
+++ branches/1.1/bin/varnishd/cache.h 2007-10-19 11:42:26 UTC (rev 2147)
@@ -368,7 +368,7 @@
/* cache_backend.c */
void VBE_Init(void);
struct vbe_conn *VBE_GetFd(struct sess *sp);
-void VBE_ClosedFd(struct worker *w, struct vbe_conn *vc, int already);
+void VBE_ClosedFd(struct worker *w, struct vbe_conn *vc);
void VBE_RecycleFd(struct worker *w, struct vbe_conn *vc);
struct bereq *vbe_new_bereq(void);
void vbe_free_bereq(struct bereq *bereq);
Modified: branches/1.1/bin/varnishd/cache_backend.c
===================================================================
--- branches/1.1/bin/varnishd/cache_backend.c 2007-10-19 11:36:35 UTC (rev 2146)
+++ branches/1.1/bin/varnishd/cache_backend.c 2007-10-19 11:42:26 UTC (rev 2147)
@@ -284,7 +284,7 @@
reuse = 1;
break;
}
- VBE_ClosedFd(sp->wrk, vc, 0);
+ VBE_ClosedFd(sp->wrk, vc);
}
if (vc == NULL) {
@@ -346,15 +346,14 @@
/* Close a connection ------------------------------------------------*/
void
-VBE_ClosedFd(struct worker *w, struct vbe_conn *vc, int already)
+VBE_ClosedFd(struct worker *w, struct vbe_conn *vc)
{
CHECK_OBJ_NOTNULL(vc, VBE_CONN_MAGIC);
assert(vc->fd >= 0);
AN(vc->backend);
WSL(w, SLT_BackendClose, vc->fd, "%s", vc->backend->vcl_name);
- if (!already)
- AZ(close(vc->fd));
+ AZ(close(vc->fd));
vc->fd = -1;
vc->backend = NULL;
LOCK(&vbemtx);
Modified: branches/1.1/bin/varnishd/cache_fetch.c
===================================================================
--- branches/1.1/bin/varnishd/cache_fetch.c 2007-10-19 11:36:35 UTC (rev 2146)
+++ branches/1.1/bin/varnishd/cache_fetch.c 2007-10-19 11:42:26 UTC (rev 2147)
@@ -341,7 +341,7 @@
} else if (http_GetHdr(hp, H_Transfer_Encoding, &b)) {
/* XXX: AUGH! */
VSL(SLT_Debug, vc->fd, "Invalid Transfer-Encoding");
- VBE_ClosedFd(sp->wrk, vc, 0);
+ VBE_ClosedFd(sp->wrk, vc);
return (-1);
} else if (strcmp(http_GetProto(hp), "HTTP/1.1")) {
switch (http_GetStatus(hp)) {
@@ -364,7 +364,7 @@
VTAILQ_REMOVE(&sp->obj->store, st, list);
STV_free(st);
}
- VBE_ClosedFd(sp->wrk, vc, 0);
+ VBE_ClosedFd(sp->wrk, vc);
return (-1);
}
@@ -382,7 +382,7 @@
cls = 1;
if (cls)
- VBE_ClosedFd(sp->wrk, vc, 0);
+ VBE_ClosedFd(sp->wrk, vc);
else
VBE_RecycleFd(sp->wrk, vc);
Modified: branches/1.1/bin/varnishd/cache_pipe.c
===================================================================
--- branches/1.1/bin/varnishd/cache_pipe.c 2007-10-19 11:36:35 UTC (rev 2146)
+++ branches/1.1/bin/varnishd/cache_pipe.c 2007-10-19 11:42:26 UTC (rev 2147)
@@ -50,8 +50,6 @@
i = read(fds[idx].fd, buf, sizeof buf);
if (i <= 0 || fds[1-idx].events == 0) {
- VSL(SLT_Debug, fds[idx].fd, "Pipe Shut read(read)");
- VSL(SLT_Debug, fds[1-idx].fd, "Pipe Shut write(read)");
shutdown(fds[idx].fd, SHUT_RD);
shutdown(fds[1-idx].fd, SHUT_WR);
fds[idx].events = 0;
@@ -59,9 +57,7 @@
}
for (p = buf; i > 0; i -= j, p += j) {
j = write(fds[1-idx].fd, p, i);
- if (j < 0) {
- VSL(SLT_Debug, fds[idx].fd, "Pipe Shut write(write)");
- VSL(SLT_Debug, fds[1-idx].fd, "Pipe Shut read(write)");
+ if (j != i) {
shutdown(fds[idx].fd, SHUT_WR);
shutdown(fds[1-idx].fd, SHUT_RD);
fds[1-idx].events = 0;
@@ -98,7 +94,7 @@
if (WRK_Flush(w)) {
vca_close_session(sp, "pipe");
- VBE_ClosedFd(sp->wrk, vc, 0);
+ VBE_ClosedFd(sp->wrk, vc);
return;
}
@@ -125,6 +121,5 @@
rdf(fds, 1);
}
vca_close_session(sp, "pipe");
- (void)close (vc->fd);
- VBE_ClosedFd(sp->wrk, vc, 1);
+ VBE_ClosedFd(sp->wrk, vc);
}
More information about the varnish-commit
mailing list