rhythmbox r6285 - in trunk: . rhythmdb



Author: jmatthew
Date: Sun Apr 12 07:22:44 2009
New Revision: 6285
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6285&view=rev

Log:
2009-04-12  Jonathan Matthew  <jonathan d14n org>

	* rhythmdb/rhythmdb.c: (process_added_entries_cb),
	(rhythmdb_add_to_stat_list), (rhythmdb_add_uri_with_types):
	Fix the stupid way the stat list mutex was being handled.


Modified:
   trunk/ChangeLog
   trunk/rhythmdb/rhythmdb.c

Modified: trunk/rhythmdb/rhythmdb.c
==============================================================================
--- trunk/rhythmdb/rhythmdb.c	(original)
+++ trunk/rhythmdb/rhythmdb.c	Sun Apr 12 07:22:44 2009
@@ -1317,10 +1317,8 @@
 						   RHYTHMDB_ENTRY_TYPE_INVALID,
 						   RHYTHMDB_ENTRY_TYPE_IGNORE,
 						   RHYTHMDB_ENTRY_TYPE_IMPORT_ERROR);
-			/* mutex is unlocked in rhythmdb_add_to_stat_list */
-		} else {
-			g_mutex_unlock (db->priv->stat_mutex);
 		}
+		g_mutex_unlock (db->priv->stat_mutex);
 	}
 
 	g_assert ((entry->flags & RHYTHMDB_ENTRY_INSERTED) == 0);
@@ -2999,8 +2997,6 @@
 	/* do we really need to check for duplicate requests here?  .. nah. */
 	result->uri = rb_refstring_new (uri);
 	db->priv->stat_list = g_list_prepend (db->priv->stat_list, result);
-
-	g_mutex_unlock (db->priv->stat_mutex);
 }
 
 
@@ -3055,7 +3051,7 @@
 		entry = rhythmdb_entry_lookup_by_location (db, uri);
 		rhythmdb_add_to_stat_list (db, uri, entry, type, ignore_type, error_type);
 
-		/* stat mutex is unlocked in rhythmdb_add_to_stat_list */
+		g_mutex_unlock (db->priv->stat_mutex);
 	}
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]