summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/module.c')
-rw-r--r--src/pulsecore/module.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index dbafa8c9..9b17cb91 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -48,7 +48,7 @@
#define UNLOAD_POLL_TIME 2
-static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED const struct timeval *tv, void *userdata) {
+static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, const struct timeval *tv, void *userdata) {
pa_core *c = PA_CORE(userdata);
struct timeval ntv;
@@ -59,7 +59,7 @@ static void timeout_callback(pa_mainloop_api *m, pa_time_event*e, PA_GCC_UNUSED
pa_module_unload_unused(c);
pa_gettimeofday(&ntv);
- pa_timeval_add(&ntv, UNLOAD_POLL_TIME*1000000);
+ pa_timeval_add(&ntv, UNLOAD_POLL_TIME*PA_USEC_PER_SEC);
m->time_restart(e, &ntv);
}
@@ -124,7 +124,7 @@ pa_module* pa_module_load(pa_core *c, const char *name, const char *argument) {
if (m->auto_unload && !c->module_auto_unload_event) {
struct timeval ntv;
pa_gettimeofday(&ntv);
- pa_timeval_add(&ntv, UNLOAD_POLL_TIME*1000000);
+ pa_timeval_add(&ntv, UNLOAD_POLL_TIME*PA_USEC_PER_SEC);
c->module_auto_unload_event = c->mainloop->time_new(c->mainloop, &ntv, timeout_callback, c);
}
@@ -190,7 +190,7 @@ void pa_module_unload_by_index(pa_core *c, uint32_t idx, pa_bool_t force) {
pa_assert(c);
pa_assert(idx != PA_IDXSET_INVALID);
- if (m->core->disallow_module_loading && !force)
+ if (c->disallow_module_loading && !force)
return;
if (!(m = pa_idxset_remove_by_index(c->modules, idx)))