summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/module.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-08-03 18:55:42 +0200
committerLennart Poettering <lennart@poettering.net>2008-08-03 18:55:42 +0200
commit9bfd67f70f31b5b84dea5e16e7b43ab939d94f6b (patch)
treed79ed5a0a1e16bf22be8efef0111f716fd13bdb3 /src/pulsecore/module.c
parent114f290be73889a92e8f0a248a3fde1fd09c2dc9 (diff)
store load_once flag for module
Diffstat (limited to 'src/pulsecore/module.c')
-rw-r--r--src/pulsecore/module.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index e003dd7c..edd0b0a7 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -76,6 +76,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
m = pa_xnew(pa_module, 1);
m->name = pa_xstrdup(name);
m->argument = pa_xstrdup(argument);
+ m->load_once = FALSE;
if (!(m->dl = lt_dlopenext(name))) {
pa_log("Failed to open module \"%s\": %s", name, lt_dlerror());
@@ -84,7 +85,9 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
if ((load_once = (pa_bool_t (*)(void)) pa_load_sym(m->dl, name, PA_SYMBOL_LOAD_ONCE))) {
- if (load_once() && c->modules) {
+ m->load_once = load_once();
+
+ if (m->load_once && c->modules) {
pa_module *i;
uint32_t idx;
/* OK, the module only wants to be loaded once, let's make sure it is */