summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltán Böszörményi <zboszor@gmail.com>2022-10-14 13:12:11 +0200
committerZoltán Böszörményi <zboszor@gmail.com>2022-10-14 13:12:11 +0200
commiteeaacececf6ebbc3437594ee883bfc459a735a4e (patch)
tree5336047a3fc720ddf994cce94dbd181f880f49d2
parenta83c6a594c421c72ec4c867ec318edebf51af389 (diff)
Fix loading external modules
The module function pointer for discover_users() was not detected and was left as NULL.
-rw-r--r--src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index f2328da..44feb6f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -64,14 +64,17 @@ load_storage_module (const char *module_name)
if (module == NULL)
return FALSE;
+ g_debug ("About to load module '%s'", filename);
if (!g_module_symbol (module, "init", (gpointer *) &store.init) ||
!g_module_symbol (module, "deinit", (gpointer *) &store.deinit) ||
!g_module_symbol (module, "print_data_save", (gpointer *) &store.print_data_save) ||
!g_module_symbol (module, "print_data_load", (gpointer *) &store.print_data_load) ||
!g_module_symbol (module, "print_data_delete", (gpointer *) &store.print_data_delete) ||
- !g_module_symbol (module, "discover_prints", (gpointer *) &store.discover_prints))
+ !g_module_symbol (module, "discover_prints", (gpointer *) &store.discover_prints) ||
+ !g_module_symbol (module, "discover_users", (gpointer *) &store.discover_users))
{
g_module_close (module);
+ g_debug ("Failed to load module. Please update your code.");
return FALSE;
}