summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/cli-command.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-08-06 19:39:12 +0200
committerLennart Poettering <lennart@poettering.net>2008-08-06 19:39:12 +0200
commit756fac8d0433d02819d3910238ebf1b7a33a3046 (patch)
tree92da910d93ed3741d2629ea124f009546bcc629e /src/pulsecore/cli-command.c
parentf1d2bf84089b1e5b5988a5e5d6d571a507a52337 (diff)
add new switch --disallow-exit
Diffstat (limited to 'src/pulsecore/cli-command.c')
-rw-r--r--src/pulsecore/cli-command.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pulsecore/cli-command.c b/src/pulsecore/cli-command.c
index 8e8f5f28..a80933fa 100644
--- a/src/pulsecore/cli-command.c
+++ b/src/pulsecore/cli-command.c
@@ -188,7 +188,9 @@ static int pa_cli_command_exit(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, pa_b
pa_assert(buf);
pa_assert(fail);
- c->mainloop->quit(c->mainloop, 0);
+ if (pa_core_exit(c, FALSE, 0) < 0)
+ pa_strbuf_puts(buf, "Not allowed to terminate daemon.\n");
+
return 0;
}