diff options
author | Lennart Poettering <lennart@poettering.net> | 2005-09-16 00:08:02 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2005-09-16 00:08:02 +0000 |
commit | e4395c223deea8803e2408b5ba57f52b4f65030f (patch) | |
tree | fbadef8b2d3b414cd5460de56810b25d9cec3db6 /polyp/module-cli.c | |
parent | 48b2a87ed8ef8a40602f4c139432513a49eecf35 (diff) |
add new field running_as_daemon to pa_core
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@356 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'polyp/module-cli.c')
-rw-r--r-- | polyp/module-cli.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/polyp/module-cli.c b/polyp/module-cli.c index 55fe8ad4..7d278f90 100644 --- a/polyp/module-cli.c +++ b/polyp/module-cli.c @@ -50,6 +50,11 @@ int pa__init(struct pa_core *c, struct pa_module*m) { struct pa_iochannel *io; assert(c && m); + if (c->running_as_daemon) { + pa_log_info(__FILE__": Running as daemon so won't load this module.\n"); + return 0; + } + if (m->argument) { pa_log(__FILE__": module doesn't accept arguments.\n"); return -1; @@ -75,6 +80,8 @@ int pa__init(struct pa_core *c, struct pa_module*m) { void pa__done(struct pa_core *c, struct pa_module*m) { assert(c && m); - pa_cli_free(m->userdata); - pa_stdio_release(); + if (c->running_as_daemon == 0) { + pa_cli_free(m->userdata); + pa_stdio_release(); + } } |