summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-06-14 09:26:38 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2012-06-14 09:26:38 +0200
commitcd25fd105503b035b078c3f4e37dddaab04a0c93 (patch)
treed92ecfe29dfc943bbafb9a4687686dacab920104 /src
parent8dc06305312b327972020b484c35eba08dbe2c83 (diff)
parent3f8addaa8d545eda8f8030d1e44d90137f24b8a0 (diff)
Merge branch 'master' of https://git.oftal.dk/munia
Diffstat (limited to 'src')
-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;
}