r5580 - trunk/varnish-cache/lib/libvarnish

martin at varnish-cache.org martin at varnish-cache.org
Mon Nov 22 10:08:53 CET 2010


Author: martin
Date: 2010-11-22 10:08:52 +0100 (Mon, 22 Nov 2010)
New Revision: 5580

Modified:
   trunk/varnish-cache/lib/libvarnish/vss.c
Log:
Remove call to VSS_parse() in VSS_open(), as VSS_parse() is called in VSS_resolve() anyway.

Fixes: #817


Modified: trunk/varnish-cache/lib/libvarnish/vss.c
===================================================================
--- trunk/varnish-cache/lib/libvarnish/vss.c	2010-11-22 09:08:28 UTC (rev 5579)
+++ trunk/varnish-cache/lib/libvarnish/vss.c	2010-11-22 09:08:52 UTC (rev 5580)
@@ -285,22 +285,13 @@
 VSS_open(const char *str, double tmo)
 {
 	int retval;
-	char *addr = NULL, *port = NULL;
 	int nvaddr, n, i;
 	struct vss_addr **vaddr;
 	struct pollfd pfd;
 
-#if 0
-	retval = VSS_parse(str, &addr, &port);
-	if (retval < 0)
-		return (retval);
-#endif
 	nvaddr = VSS_resolve(str, NULL, &vaddr);
-	if (nvaddr <= 0) {
-		free(addr);
-		free(port);
+	if (nvaddr <= 0)
 		return (-1);
-	}
 	for (n = 0; n < nvaddr; n++) {
 		retval = VSS_connect(vaddr[n], tmo != 0.0);
 		if (retval >= 0 && tmo != 0.0) {
@@ -318,7 +309,5 @@
 	for (n = 0; n < nvaddr; n++)
 		free(vaddr[n]);
 	free(vaddr);
-	free(addr);
-	free(port);
 	return (retval);
 }




More information about the varnish-commit mailing list