From b054b6d51e0aca94a7d4feef606b61068894fcb4 Mon Sep 17 00:00:00 2001 From: Benjamin Bertrand Date: Mon, 9 Sep 2019 12:34:17 +0200 Subject: [PATCH] Separate '-h' from "unknown arguments" --- p2pApp/gwmain.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/p2pApp/gwmain.cpp b/p2pApp/gwmain.cpp index 8a4b5d5..1ada367 100644 --- a/p2pApp/gwmain.cpp +++ b/p2pApp/gwmain.cpp @@ -73,6 +73,9 @@ void getargs(ServerConfig& arg, int argc, char *argv[]) while( (opt=getopt(argc, argv, "qvhiIC"))!=-1) { switch(opt) { + case 'h': + usage(argv[0]); + exit(0); case 'q': arg.debug--; break; @@ -90,9 +93,8 @@ void getargs(ServerConfig& arg, int argc, char *argv[]) break; default: std::cerr<<"Unknown argument -"<