[master] 630711d Now that we have -S as default, also make "-T localhost:0" the default.
Poul-Henning Kamp
phk at varnish-cache.org
Mon Nov 11 09:28:19 CET 2013
commit 630711dba22be5efd9be2bc74896cefaa4d99dfa
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Nov 11 08:26:47 2013 +0000
Now that we have -S as default, also make "-T localhost:0" the default.
This picks a random port number, possibly two, one for IPv4 and one for
IPv6, and varnishadm() can find those in VSM.
diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 739d441..8b6fd82 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -353,7 +353,7 @@ main(int argc, char * const *argv)
const char *S_arg = NULL;
const char *s_arg = "malloc,100m";
int s_arg_given = 0;
- const char *T_arg = NULL;
+ const char *T_arg = "localhost:0";
char *p, *vcl = NULL;
struct cli cli[1];
struct vpf_fh *pfh = NULL;
@@ -511,7 +511,10 @@ main(int argc, char * const *argv)
S_arg = optarg;
break;
case 'T':
- T_arg = optarg;
+ if (*optarg != '\0')
+ T_arg = optarg;
+ else
+ T_arg = NULL;
break;
case 'u':
MCF_ParamSet(cli, "user", optarg);
More information about the varnish-commit
mailing list