diff options
author | Jonas Suhr Christensen <jsc@umbraculum.org> | 2012-06-14 09:21:02 +0200 |
---|---|---|
committer | Jonas Suhr Christensen <jsc@umbraculum.org> | 2012-06-14 09:21:02 +0200 |
commit | 3f8addaa8d545eda8f8030d1e44d90137f24b8a0 (patch) | |
tree | 3f5946a85659e351fcd96c35b925c8fe56ca898f /src | |
parent | 91ea36900f8363f6f94ed4c9dc7f07fbf19cad6a (diff) |
Readded interactive mode.
Diffstat (limited to 'src')
-rw-r--r-- | src/muniacli.cc | 8 |
1 files 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; } |