[rygel] Better handling of Module.symbol() failure
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Subject: [rygel] Better handling of Module.symbol() failure
- Date: Wed, 27 May 2009 07:43:34 -0400 (EDT)
commit 1457cff01f6d0ffca056d6b71e8d468b459be399
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Wed May 27 14:09:40 2009 +0300
Better handling of Module.symbol() failure
---
src/rygel/rygel-plugin-loader.vala | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/rygel/rygel-plugin-loader.vala b/src/rygel/rygel-plugin-loader.vala
index 39b4b94..0fef6b0 100644
--- a/src/rygel/rygel-plugin-loader.vala
+++ b/src/rygel/rygel-plugin-loader.vala
@@ -148,16 +148,18 @@ public class Rygel.PluginLoader : Object {
void* function;
- module.symbol("module_init", out function);
-
- ModuleInitFunc module_init = (ModuleInitFunc) function;
- if (module_init == null) {
+ if (!module.symbol("module_init", out function)) {
warning ("Failed to find entry point function 'module_init'" +
- " in module loaded from path: '%s'\n", file_path);
+ " in module loaded from path '%s': %s\n",
+ file_path,
+ Module.error ());
return;
}
+ ModuleInitFunc module_init = (ModuleInitFunc) function;
+ assert (module_init != null);
+
// We don't want our modules to ever unload
module.make_resident ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]