[master] 08b8b27 More detail on write errors.

Poul-Henning Kamp phk at varnish-cache.org
Wed Sep 21 12:40:14 CEST 2011


commit 08b8b27eedd5d52ccd9ca608cda762332d944ebe
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