From 756fac8d0433d02819d3910238ebf1b7a33a3046 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 6 Aug 2008 19:39:12 +0200 Subject: add new switch --disallow-exit --- src/pulsecore/cli-command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/pulsecore/cli-command.c') 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; } -- cgit