r3127 - trunk/varnish-cache/bin/varnishtest

phk at projects.linpro.no phk at projects.linpro.no
Tue Aug 26 09:51:12 CEST 2008


Author: phk
Date: 2008-08-26 09:51:12 +0200 (Tue, 26 Aug 2008)
New Revision: 3127

Modified:
   trunk/varnish-cache/bin/varnishtest/vtc_client.c
   trunk/varnish-cache/bin/varnishtest/vtc_server.c
Log:
Use TCP_close() to properly ignore the "canonical" TCP legal errno values
consistently.

Fixes #297



Modified: trunk/varnish-cache/bin/varnishtest/vtc_client.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_client.c	2008-08-26 07:47:23 UTC (rev 3126)
+++ trunk/varnish-cache/bin/varnishtest/vtc_client.c	2008-08-26 07:51:12 UTC (rev 3127)
@@ -87,7 +87,7 @@
 	vtc_log(vl, 3, "Connected to %s fd is %d", c->connect, fd);
 	http_process(vl, c->spec, fd, 1);
 	vtc_log(vl, 3, "Closing fd %d", fd);
-	AZ(close(fd));
+	TCP_close(&fd);
 	vtc_log(vl, 2, "Ending");
 
 	return (NULL);

Modified: trunk/varnish-cache/bin/varnishtest/vtc_server.c
===================================================================
--- trunk/varnish-cache/bin/varnishtest/vtc_server.c	2008-08-26 07:47:23 UTC (rev 3126)
+++ trunk/varnish-cache/bin/varnishtest/vtc_server.c	2008-08-26 07:51:12 UTC (rev 3127)
@@ -98,7 +98,7 @@
 		http_process(vl, s->spec, fd, 0);
 		vtc_log(vl, 3, "shutting fd %d", fd);
 		AZ(shutdown(fd, SHUT_WR));
-		assert(close(fd) == 0 || errno == ECONNRESET);
+		TCP_close(&fd);
 	}
 	vtc_log(vl, 2, "Ending");
 	return (NULL);
@@ -177,7 +177,7 @@
 		exit (1);
 	}
 	s->tp = 0;
-	AZ(close(s->sock));
+	TCP_close(&s->sock);
 	s->sock = -1;
 }
 




More information about the varnish-commit mailing list