summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2012-06-14 09:21:02 +0200
committerJonas Suhr Christensen <jsc@umbraculum.org>2012-06-14 09:21:02 +0200
commit3f8addaa8d545eda8f8030d1e44d90137f24b8a0 (patch)
tree3f5946a85659e351fcd96c35b925c8fe56ca898f
parent91ea36900f8363f6f94ed4c9dc7f07fbf19cad6a (diff)
Readded interactive mode.
-rw-r--r--src/muniacli.cc8
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;
}