From d904f43574e1afdd59bc29734617943543445e2f Mon Sep 17 00:00:00 2001 From: Karl Ramm Date: Sat, 26 Oct 2013 13:53:49 -0400 Subject: If no hostname is specified, use 127.0.0.1. If no hostname is specified, use 127.0.0.1, rather than trying to infer the IP address of the local host from the system hostname, because as computers are considerably cheaper and lighter than they were in 1987, they are somewhat more often on the network on an address that doesn't match their hostname. --- clients/zstat/zstat.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/clients/zstat/zstat.c b/clients/zstat/zstat.c index 7ae5954..6856893 100644 --- a/clients/zstat/zstat.c +++ b/clients/zstat/zstat.c @@ -104,11 +104,7 @@ main(int argc, srv_port = (sp) ? sp->s_port : SERVER_SVC_FALLBACK; if (optind == argc) { - if (gethostname(hostname, sizeof(hostname)) < 0) { - com_err("zstat",errno,"while finding hostname"); - exit(-1); - } - do_stat(hostname); + do_stat("127.0.0.1"); exit(0); } -- cgit v1.2.3