From ad530a76ea78c63a585e082b8b50dfebe3226c12 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Fri, 8 Jun 2012 18:19:43 +0200 Subject: [PATCH] Fixed invalid commandline option segfaults, renamed no-daemon to the proper nodaemon as mentioned in all documentation and help messages. --- lib/config.cpp | 5 +++-- src/controller.cpp | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/config.cpp b/lib/config.cpp index da541832..17cb5d4f 100644 --- a/lib/config.cpp +++ b/lib/config.cpp @@ -41,9 +41,10 @@ void Util::Config::parseArgs(int argc, char ** argv){ {"port",1,0,'p'}, {"interface",1,0,'i'}, {"username",1,0,'u'}, - {"no-daemon",0,0,'n'}, + {"nodaemon",0,0,'n'}, {"daemon",0,0,'d'}, - {"version",0,0,'v'} + {"version",0,0,'v'}, + 0 }; while ((opt = getopt_long(argc, argv, optString, longOpts, 0)) != -1){ switch (opt){ diff --git a/src/controller.cpp b/src/controller.cpp index 95bc119d..2f4ca242 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -337,9 +337,10 @@ int main(int argc, char ** argv){ {"interface",1,0,'i'}, {"account",1,0,'a'}, {"username",1,0,'u'}, - {"no-daemon",0,0,'n'}, + {"nodaemon",0,0,'n'}, {"daemon",0,0,'d'}, - {"version",0,0,'v'} + {"version",0,0,'v'}, + 0 }; while ((opt = getopt_long(argc, argv, optString, longOpts, 0)) != -1){ switch (opt){