[3.0] 656e038 More detail on write errors.

Tollef Fog Heen tfheen at varnish-cache.org
Thu Sep 22 14:04:15 CEST 2011


commit 656e038e1657c0384d48789833747a228be9bcd6
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Sep 21 10:40:05 2011 +0000

    More detail on write errors.

diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index e6aaf33..024e376 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -143,7 +143,8 @@ http_write(const struct http *hp, int lvl, const char *pfx)
 	vtc_dump(hp->vl, lvl, pfx, VSB_data(hp->vsb), VSB_len(hp->vsb));
 	l = write(hp->fd, VSB_data(hp->vsb), VSB_len(hp->vsb));
 	if (l != VSB_len(hp->vsb))
-		vtc_log(hp->vl, 0, "Write failed: %s", strerror(errno));
+		vtc_log(hp->vl, 0, "Write failed: (%d vs %d) %s",
+		    l, VSB_len(hp->vsb), strerror(errno));
 }
 
 /**********************************************************************



More information about the varnish-commit mailing list