[rygel] core: Copy the plugin list before creating devices
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [rygel] core: Copy the plugin list before creating devices
- Date: Wed, 29 Jul 2009 22:01:30 +0000 (UTC)
commit 5f661fc32987819753aea475c941cf48b8cdd203
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Jul 30 03:27:54 2009 +0300
core: Copy the plugin list before creating devices
Copy the plugin list before creting devices for each plugin. Otherwise the
mainloop gets run during the device creation and that mostly results in the
modification of the Hashmap holding the plugin list.
src/rygel/rygel-main.vala | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-main.vala b/src/rygel/rygel-main.vala
index 8de27bb..4cdfbdc 100644
--- a/src/rygel/rygel-main.vala
+++ b/src/rygel/rygel-main.vala
@@ -107,8 +107,12 @@ public class Rygel.Main : Object {
if (host_ip == null || host_ip == context.host_ip) {
var factory = new RootDeviceFactory (context);
-
+ var plugins = new ArrayList <Plugin> ();
foreach (var plugin in this.plugin_loader.list_plugins ()) {
+ plugins.add (plugin);
+ }
+
+ foreach (var plugin in plugins) {
this.create_device (plugin, factory);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]