[maemo-commits] [maemo-commits] r16676 - in projects/haf/trunk/hildon-thumbnail: . daemon

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Fri Nov 14 11:42:15 EET 2008
Author: pvanhoof
Date: 2008-11-14 11:42:14 +0200 (Fri, 14 Nov 2008)
New Revision: 16676

Modified:
   projects/haf/trunk/hildon-thumbnail/ChangeLog
   projects/haf/trunk/hildon-thumbnail/daemon/hildon-thumbnail-plugin.c
Log:
2008-11-14  Philip Van Hoof  <philip at codeminded.be>

        * daemon/hildon-thumbnail-plugin.c: Fixed the locking to cope with
        the video plugin



Modified: projects/haf/trunk/hildon-thumbnail/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-thumbnail/ChangeLog	2008-11-14 09:21:43 UTC (rev 16675)
+++ projects/haf/trunk/hildon-thumbnail/ChangeLog	2008-11-14 09:42:14 UTC (rev 16676)
@@ -1,3 +1,8 @@
+2008-11-14  Philip Van Hoof  <philip at codeminded.be>
+
+	* daemon/hildon-thumbnail-plugin.c: Fixed the locking to cope with
+	the video plugin
+
 2008-11-14  Mikael Ottela    <mikael.ottela at ixonos.com>
 
 	* daemon/plugins/gstreamer-video-plugin.c: Fixed some bugs in the 

Modified: projects/haf/trunk/hildon-thumbnail/daemon/hildon-thumbnail-plugin.c
===================================================================
--- projects/haf/trunk/hildon-thumbnail/daemon/hildon-thumbnail-plugin.c	2008-11-14 09:21:43 UTC (rev 16675)
+++ projects/haf/trunk/hildon-thumbnail/daemon/hildon-thumbnail-plugin.c	2008-11-14 09:42:14 UTC (rev 16676)
@@ -94,11 +94,13 @@
 				    const gchar *uri, 
 				    GError **error)
 {
-	GList *copy = outplugs;
+	GList *copy = g_list_copy (outplugs);
 	GString *errors = NULL;
 	GQuark domain;
+	gboolean dounl = TRUE;
 
 	g_static_rec_mutex_lock (&mutex);
+	copy = g_list_copy (outplugs);
 
 	while (copy) {
 		GModule *module = copy->data;
@@ -111,6 +113,7 @@
 
 			if (g_module_symbol (module, "hildon_thumbnail_outplugin_is_active", (gpointer *) &isac_func)) {
 				if (isac_func ()) {
+
 					out_func (rgb8_pixmap, width, height, rowstride, bits_per_sample, type, mtime, uri, &nerror);
 
 					if (nerror) {
@@ -121,8 +124,8 @@
 						g_string_append (errors, nerror->message);
 						g_error_free (nerror);
 					}
-				}
-			}
+				} 
+			} 
 
 		}
 		copy = g_list_next (copy);
@@ -134,6 +137,8 @@
 	}
 
 	g_static_rec_mutex_unlock (&mutex);
+
+	g_list_free (copy);
 }
 
 
@@ -209,10 +214,11 @@
 	g_static_rec_mutex_lock (&mutex);
 
 	if (g_module_symbol (module, "hildon_thumbnail_plugin_create", (gpointer *) &func)) {
+		g_static_rec_mutex_unlock (&mutex);
 		(func) (uris, mime_hint, failed_uris, error);
-	}
+	} else
+		g_static_rec_mutex_unlock (&mutex);
 
-	g_static_rec_mutex_unlock (&mutex);
 }
 
 void


More information about the maemo-commits mailing list