[experimental-ims] 872c478 Actually use a default (80) if no port is specified

Geoff Simmons geoff at varnish-cache.org
Mon Jan 16 17:58:31 CET 2012


commit 872c478170e0640444fe5c173845f8667f9adae7
Author: Rogier 'DocWilco' Mulhuijzen <github at bsdchicks.com>
Date:   Sat Jan 14 13:37:57 2012 +0100

    Actually use a default (80) if no port is specified

diff --git a/lib/libvcl/vcc_dir_dns.c b/lib/libvcl/vcc_dir_dns.c
index bdc0a21..174d1ab 100644
--- a/lib/libvcl/vcc_dir_dns.c
+++ b/lib/libvcl/vcc_dir_dns.c
@@ -88,7 +88,7 @@ print_backend(struct vcc *tl,
 	if (serial >= 0)
 		Fb(tl, 0, "[%d]", serial);
 	Fb(tl, 0, "\",\n");
-	Emit_Sockaddr(tl, &tmptok, b_defaults.port);
+	Emit_Sockaddr(tl, &tmptok, b_defaults.port ? b_defaults.port : "80");
 
 	Fb(tl, 0, "\t.hosthdr = \"");
 	if (b_defaults.hostheader != NULL)



More information about the varnish-commit mailing list