[master] 6afd6dc6f Enable the use of VTCP_Assert in v1f_read()

Martin Blix Grydeland martin at varnish-software.com
Mon Nov 9 15:13:08 UTC 2020


commit 6afd6dc6f8c9492335cafdea41ce47e2fb6294eb
Author: Martin Blix Grydeland <martin at varnish-software.com>
Date:   Wed Oct 7 15:35:13 2020 +0200

    Enable the use of VTCP_Assert in v1f_read()
    
    Now that VTCP_Assert() accepts EAGAIN as a legal errno value for read()
    errors, uncomment this check.

diff --git a/bin/varnishd/http1/cache_http1_vfp.c b/bin/varnishd/http1/cache_http1_vfp.c
index 5e3b5cfa0..13e042e6f 100644
--- a/bin/varnishd/http1/cache_http1_vfp.c
+++ b/bin/varnishd/http1/cache_http1_vfp.c
@@ -44,6 +44,7 @@
 #include "cache_http1.h"
 
 #include "vct.h"
+#include "vtcp.h"
 
 /*--------------------------------------------------------------------
  * Read up to len bytes, returning pipelined data first.
@@ -76,7 +77,7 @@ v1f_read(const struct vfp_ctx *vc, struct http_conn *htc, void *d, ssize_t len)
 	if (len > 0) {
 		i = read(*htc->rfd, p, len);
 		if (i < 0) {
-			// XXX: VTCP_Assert(i); // but also: EAGAIN
+			VTCP_Assert(i);
 			VSLb(vc->wrk->vsl, SLT_FetchError,
 			    "%s", vstrerror(errno));
 			return (i);


More information about the varnish-commit mailing list