[PATCH v3 01/11] module: Add PA_CORE_HOOK_MODULE_UNLOAD

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/pulsecore/core.h   | 1 +
 src/pulsecore/module.c | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/src/pulsecore/core.h b/src/pulsecore/core.h
index 1f9df73..db7308c 100644
--- a/src/pulsecore/core.h
+++ b/src/pulsecore/core.h
@@ -128,6 +128,7 @@ typedef enum pa_core_hook {
     PA_CORE_HOOK_CARD_PROFILE_AVAILABLE_CHANGED,
     PA_CORE_HOOK_PORT_AVAILABLE_CHANGED,
     PA_CORE_HOOK_PORT_LATENCY_OFFSET_CHANGED,
+    PA_CORE_HOOK_MODULE_UNLOAD,
     PA_CORE_HOOK_MAX
 } pa_core_hook_t;
 
diff --git a/src/pulsecore/module.c b/src/pulsecore/module.c
index bee8a20..e495436 100644
--- a/src/pulsecore/module.c
+++ b/src/pulsecore/module.c
@@ -223,6 +223,8 @@ static void pa_module_free(pa_module *m) {
 
     pa_log_info("Unloading \"%s\" (index: #%u).", m->name, m->index);
 
+    pa_hook_fire(&m->core->hooks[PA_CORE_HOOK_MODULE_UNLOAD], m);
+
     if (m->done)
         m->done(m);
 
-- 
1.9.3



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux