mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-25 07:31:05 +00:00
Merge pull request #690 from Pablohn26/master
Warn about invalid network id instead of help
This commit is contained in:
commit
54218f6c3c
6
one.cpp
6
one.cpp
@ -466,7 +466,7 @@ static int cli(int argc,char **argv)
|
|||||||
}
|
}
|
||||||
} else if (command == "join") {
|
} else if (command == "join") {
|
||||||
if (arg1.length() != 16) {
|
if (arg1.length() != 16) {
|
||||||
cliPrintHelp(argv[0],stderr);
|
printf("invalid network id" ZT_EOL_S);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
requestHeaders["Content-Type"] = "application/json";
|
requestHeaders["Content-Type"] = "application/json";
|
||||||
@ -494,7 +494,7 @@ static int cli(int argc,char **argv)
|
|||||||
}
|
}
|
||||||
} else if (command == "leave") {
|
} else if (command == "leave") {
|
||||||
if (arg1.length() != 16) {
|
if (arg1.length() != 16) {
|
||||||
cliPrintHelp(argv[0],stderr);
|
printf("invalid network id" ZT_EOL_S);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
unsigned int scode = Http::DEL(
|
unsigned int scode = Http::DEL(
|
||||||
@ -592,7 +592,7 @@ static int cli(int argc,char **argv)
|
|||||||
}
|
}
|
||||||
} else if (command == "set") {
|
} else if (command == "set") {
|
||||||
if (arg1.length() != 16) {
|
if (arg1.length() != 16) {
|
||||||
cliPrintHelp(argv[0],stderr);
|
printf("invalid network id" ZT_EOL_S);
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
std::size_t eqidx = arg2.find('=');
|
std::size_t eqidx = arg2.find('=');
|
||||||
|
Loading…
Reference in New Issue
Block a user