From a9778549f2a9b9a6c410516fae7d89f20ebe3e94 Mon Sep 17 00:00:00 2001 From: Pablo Hinojosa Date: Sun, 11 Mar 2018 03:39:13 +0100 Subject: [PATCH] Warn about invalid network id instead of help --- one.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/one.cpp b/one.cpp index b40e28fc8..495c3147b 100644 --- a/one.cpp +++ b/one.cpp @@ -443,7 +443,7 @@ static int cli(int argc,char **argv) } } else if (command == "join") { if (arg1.length() != 16) { - cliPrintHelp(argv[0],stderr); + printf("invalid network id" ZT_EOL_S); return 2; } requestHeaders["Content-Type"] = "application/json"; @@ -471,7 +471,7 @@ static int cli(int argc,char **argv) } } else if (command == "leave") { if (arg1.length() != 16) { - cliPrintHelp(argv[0],stderr); + printf("invalid network id" ZT_EOL_S); return 2; } unsigned int scode = Http::DEL( @@ -564,7 +564,7 @@ static int cli(int argc,char **argv) } } else if (command == "set") { if (arg1.length() != 16) { - cliPrintHelp(argv[0],stderr); + printf("invalid network id" ZT_EOL_S); return 2; } std::size_t eqidx = arg2.find('=');