summaryrefslogtreecommitdiff
path: root/one.cpp
diff options
context:
space:
mode:
authorPablo Hinojosa <pablohn6@gmail.com>2018-03-11 03:39:13 +0100
committerPablo Hinojosa <pablohn6@gmail.com>2018-03-11 03:39:13 +0100
commita9778549f2a9b9a6c410516fae7d89f20ebe3e94 (patch)
tree723bfe5e41ced7261a1f1e7e3be98dd607ed0948 /one.cpp
parente57d0fdccc78b01e93360245fd2a9c7b87214b34 (diff)
downloadinfinitytier-a9778549f2a9b9a6c410516fae7d89f20ebe3e94.tar.gz
infinitytier-a9778549f2a9b9a6c410516fae7d89f20ebe3e94.zip
Warn about invalid network id instead of help
Diffstat (limited to 'one.cpp')
-rw-r--r--one.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/one.cpp b/one.cpp
index b40e28fc..495c3147 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('=');