From 3f8addaa8d545eda8f8030d1e44d90137f24b8a0 Mon Sep 17 00:00:00 2001 From: Jonas Suhr Christensen Date: Thu, 14 Jun 2012 09:21:02 +0200 Subject: Readded interactive mode. --- src/muniacli.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/muniacli.cc b/src/muniacli.cc index f0e151d..14f543e 100644 --- a/src/muniacli.cc +++ b/src/muniacli.cc @@ -318,19 +318,19 @@ int main(int argc, char** argv) } } - if(cmd == DEFAULT) { + if(!interactive && cmd == DEFAULT) { fprintf(stderr, "%s\n", USAGE); exit(1); } - if(!taskbyname.empty()) { + if(!interactive && !taskbyname.empty()) { taskbyid = -1; fprintf(stderr, "Option '-N, --name' is not yet supported\n"); fprintf(stderr, "%s\n", USAGE); exit(1); } - if(taskbyid.empty()) { + if(!interactive && taskbyid.empty()) { fprintf(stderr, "%s\n", USAGE); exit(1); } @@ -371,6 +371,6 @@ int main(int argc, char** argv) } */ - client("localhost", port); + client(host.c_str(), port); return 0; } -- cgit v1.2.3