r5081 - trunk/varnish-cache/bin/varnishd

phk at varnish-cache.org phk at varnish-cache.org
Tue Aug 10 11:23:39 CEST 2010


Author: phk
Date: 2010-08-10 11:23:39 +0200 (Tue, 10 Aug 2010)
New Revision: 5081

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_backend.c
   trunk/varnish-cache/bin/varnishd/cache_fetch.c
   trunk/varnish-cache/bin/varnishd/cache_pipe.c
Log:
VBE_ClosedFd() was badly named, loose the 'd' to indicate that it
will close the Fd, rather than being an indication this already
happened.



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2010-08-10 09:08:21 UTC (rev 5080)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2010-08-10 09:23:39 UTC (rev 5081)
@@ -476,7 +476,7 @@
 struct vbe_conn *VBE_GetFd(const struct director *, struct sess *sp);
 int VBE_Healthy(double now, const struct director *, uintptr_t target);
 int VBE_Healthy_sp(const struct sess *sp, const struct director *);
-void VBE_ClosedFd(struct sess *sp);
+void VBE_CloseFd(struct sess *sp);
 void VBE_RecycleFd(struct sess *sp);
 void VBE_AddHostHeader(const struct sess *sp);
 void VBE_Poll(void);

Modified: trunk/varnish-cache/bin/varnishd/cache_backend.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_backend.c	2010-08-10 09:08:21 UTC (rev 5080)
+++ trunk/varnish-cache/bin/varnishd/cache_backend.c	2010-08-10 09:23:39 UTC (rev 5081)
@@ -342,7 +342,7 @@
 		}
 		VSC_main->backend_toolate++;
 		sp->vbe = vc;
-		VBE_ClosedFd(sp);
+		VBE_CloseFd(sp);
 	}
 
 	if (!vbe_Healthy(sp->t_req, (uintptr_t)sp->objhead, bp)) {
@@ -374,7 +374,7 @@
 /* Close a connection ------------------------------------------------*/
 
 void
-VBE_ClosedFd(struct sess *sp)
+VBE_CloseFd(struct sess *sp)
 {
 	struct backend *bp;
 

Modified: trunk/varnish-cache/bin/varnishd/cache_fetch.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_fetch.c	2010-08-10 09:08:21 UTC (rev 5080)
+++ trunk/varnish-cache/bin/varnishd/cache_fetch.c	2010-08-10 09:23:39 UTC (rev 5081)
@@ -374,7 +374,7 @@
 	i = FetchReqBody(sp);
 	if (WRW_FlushRelease(w) || i > 0) {
 		WSP(sp, SLT_FetchError, "backend write error: %d", errno);
-		VBE_ClosedFd(sp);
+		VBE_CloseFd(sp);
 		/* XXX: other cleanup ? */
 		return (__LINE__);
 	}
@@ -397,7 +397,7 @@
 		if (i < 0) {
 			WSP(sp, SLT_FetchError,
 			    "http read error: %d", errno);
-			VBE_ClosedFd(sp);
+			VBE_CloseFd(sp);
 			/* XXX: other cleanup ? */
 			return (__LINE__);
 		}
@@ -412,7 +412,7 @@
 
 	if (http_DissectResponse(sp->wrk, sp->wrk->htc, hp)) {
 		WSP(sp, SLT_FetchError, "http format error");
-		VBE_ClosedFd(sp);
+		VBE_CloseFd(sp);
 		/* XXX: other cleanup ? */
 		return (__LINE__);
 	}
@@ -466,7 +466,7 @@
 		sp->wrk->stats.fetch_bad++;
 		/* XXX: AUGH! */
 		WSL(sp->wrk, SLT_Debug, vc->fd, "Invalid Transfer-Encoding");
-		VBE_ClosedFd(sp);
+		VBE_CloseFd(sp);
 		return (__LINE__);
 	} else if (http_HdrIs(hp, H_Connection, "keep-alive")) {
 		/*
@@ -515,7 +515,7 @@
 			VTAILQ_REMOVE(&sp->obj->store, st, list);
 			STV_free(st);
 		}
-		VBE_ClosedFd(sp);
+		VBE_CloseFd(sp);
 		sp->obj->len = 0;
 		return (__LINE__);
 	}
@@ -540,7 +540,7 @@
 		cls = 1;
 
 	if (cls)
-		VBE_ClosedFd(sp);
+		VBE_CloseFd(sp);
 	else
 		VBE_RecycleFd(sp);
 

Modified: trunk/varnish-cache/bin/varnishd/cache_pipe.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pipe.c	2010-08-10 09:08:21 UTC (rev 5080)
+++ trunk/varnish-cache/bin/varnishd/cache_pipe.c	2010-08-10 09:23:39 UTC (rev 5081)
@@ -91,7 +91,7 @@
 
 	if (i) {
 		vca_close_session(sp, "pipe");
-		VBE_ClosedFd(sp);
+		VBE_CloseFd(sp);
 		return;
 	}
 
@@ -135,5 +135,5 @@
 		(void)shutdown(vc->fd, SHUT_WR);
 	}
 	vca_close_session(sp, "pipe");
-	VBE_ClosedFd(sp);
+	VBE_CloseFd(sp);
 }




More information about the varnish-commit mailing list