rygel r308 - trunk/src/rygel
- From: zeeshanak svn gnome org
- To: svn-commits-list gnome org
- Subject: rygel r308 - trunk/src/rygel
- Date: Wed, 26 Nov 2008 14:28:20 +0000 (UTC)
Author: zeeshanak
Date: Wed Nov 26 14:28:20 2008
New Revision: 308
URL: http://svn.gnome.org/viewvc/rygel?rev=308&view=rev
Log:
Merge two functions together.
Modified:
trunk/src/rygel/rygel-plugin-loader.vala
Modified: trunk/src/rygel/rygel-plugin-loader.vala
==============================================================================
--- trunk/src/rygel/rygel-plugin-loader.vala (original)
+++ trunk/src/rygel/rygel-plugin-loader.vala Wed Nov 26 14:28:20 2008
@@ -95,23 +95,11 @@
}
private void load_plugin_from_file (string file_path) {
- Plugin plugin;
- Module module;
-
- plugin = this.load_media_provider_from_file (file_path, out module);
- if (plugin != null) {
- this.plugin_available (plugin);
- this.modules.append (#module);
- }
- }
-
- private Plugin? load_media_provider_from_file (string file_path,
- out Module module) {
- module = Module.open (file_path, ModuleFlags.BIND_LOCAL);
+ Module module = Module.open (file_path, ModuleFlags.BIND_LOCAL);
if (module == null) {
debug ("Failed to load plugin from path: '%s'\n", file_path);
- return null;
+ return;
}
void* function;
@@ -119,16 +107,19 @@
module.symbol("load_plugin", out function);
LoadPluginFunc load_plugin = (LoadPluginFunc) function;
-
if (load_plugin == null) {
warning ("Failed to load plugin from path: '%s'\n", file_path);
- return null;
+ return;
}
debug ("Loaded plugin: '%s'\n", module.name());
- return load_plugin ();
+ Plugin plugin = load_plugin ();
+ if (plugin != null) {
+ this.plugin_available (plugin);
+ this.modules.append (#module);
+ }
}
private static bool is_dir (File file) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]