r5411 - trunk/varnish-cache/bin/varnishtest

phk at varnish-cache.org phk at varnish-cache.org
Tue Oct 5 21:33:35 CEST 2010


Author: phk
Date: 2010-10-05 21:33:34 +0200 (Tue, 05 Oct 2010)
New Revision: 5411

Modified:
   trunk/varnish-cache/bin/varnishtest/vtc_client.c
Log:
Log the clients end of the tcp connection so we can find it in
varnishlog output.



Modified: trunk/varnish-cache/bin/varnishtest/vtc_client.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_client.c	2010-10-05 19:30:11 UTC (rev 5410)
+++ trunk/varnish-cache/bin/varnishtest/vtc_client.c	2010-10-05 19:33:34 UTC (rev 5411)
@@ -82,6 +82,7 @@
 	unsigned u;
 	struct vsb *vsb;
 	char *p;
+	char mabuf[32], mpbuf[32];
 
 	CAST_OBJ_NOTNULL(c, priv, CLIENT_MAGIC);
 	AN(*c->connect);
@@ -107,7 +108,9 @@
 		if (fd < 0)
 			vtc_log(c->vl, 0, "Failed to open %s", vsb_data(vsb));
 		assert(fd >= 0);
-		vtc_log(vl, 3, "connected fd %d", fd);
+		TCP_myname(fd, mabuf, sizeof mabuf, mpbuf, sizeof mpbuf);
+		vtc_log(vl, 3, "connected fd %d from %s %s to %s",
+		    fd, mabuf, mpbuf, vsb_data(vsb));
 		http_process(vl, c->spec, fd, -1);
 		vtc_log(vl, 3, "closing fd %d", fd);
 		TCP_close(&fd);




More information about the varnish-commit mailing list