rhythmbox r6242 - in trunk: . rhythmdb



Author: jmatthew
Date: Mon Mar 23 11:37:35 2009
New Revision: 6242
URL: http://svn.gnome.org/viewvc/rhythmbox?rev=6242&view=rev

Log:
2009-03-23  Jonathan Matthew  <jonathan d14n org>

	* rhythmdb/rhythmdb.c: (process_added_entries_cb),
	(rhythmdb_add_uri_with_types):
	Fix a double-unlock of the stat mutex, add comments explaining the
	slight weirdness in the way it's unlocked.  Probably fixes #576238.


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

Modified: trunk/rhythmdb/rhythmdb.c
==============================================================================
--- trunk/rhythmdb/rhythmdb.c	(original)
+++ trunk/rhythmdb/rhythmdb.c	Mon Mar 23 11:37:35 2009
@@ -1317,8 +1317,10 @@
 						   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);
@@ -3052,6 +3054,8 @@
 
 		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 */
 	}
 }
 



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