From 04de2302a7987d6046abed7b8c970488ed314e58 Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Wed, 3 Oct 2018 14:24:21 -0700 Subject: [PATCH] More insightful errors for get command --- one.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/one.cpp b/one.cpp index b770451c0..0b18ed911 100644 --- a/one.cpp +++ b/one.cpp @@ -630,7 +630,7 @@ static int cli(int argc,char **argv) } } else if (command == "get") { if (arg1.length() != 16) { - cliPrintHelp(argv[0],stderr); + fprintf(stderr,"invalid network ID format, must be a 16-digit hexidecimal number\n"); return 2; } char jsons[1024], cl[128]; @@ -654,16 +654,21 @@ static int cli(int argc,char **argv) printf("%u %s invalid JSON response (unknown exception)" ZT_EOL_S,scode,command.c_str()); return 1; } + bool bNetworkFound = false; if (j.is_array()) { for(unsigned long i=0;i