[master] 6c957b4 Make varnishadm able to find args automatically
Tollef Fog Heen
tfheen at varnish-cache.org
Wed Mar 16 10:56:14 CET 2011
commit 6c957b4d8acf6e1bea0814e2ef6b500fef7407b9
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date: Wed Mar 16 10:54:31 2011 +0100
Make varnishadm able to find args automatically
varnishadm already supported -n for getting the connection arguments.
However, unlike the other tools, you needed to pass an -n argument, it
did not default to anything. It now uses the compiled-in default.
Fixes: #875
diff --git a/bin/varnishadm/varnishadm.c b/bin/varnishadm/varnishadm.c
index be400d0..8d98181 100644
--- a/bin/varnishadm/varnishadm.c
+++ b/bin/varnishadm/varnishadm.c
@@ -355,7 +355,9 @@ main(int argc, char * const *argv)
if (sock < 0)
exit(2);
} else if (T_arg == NULL) {
- usage();
+ sock = n_arg_sock("");
+ if (sock < 0)
+ exit(2);
} else {
assert(T_arg != NULL);
sock = cli_sock(T_arg, S_arg);
More information about the varnish-commit
mailing list