From 9f3db5a70b4181fef6a70ef84b70fdd5b3c3e451 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 13 Jun 2012 21:23:34 +0200 Subject: directory: require db lock for _{add,remove}_song() --- src/directory.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/directory.c') diff --git a/src/directory.c b/src/directory.c index 930881129..e886698d6 100644 --- a/src/directory.c +++ b/src/directory.c @@ -186,6 +186,7 @@ directory_lookup_directory(struct directory *directory, const char *uri) void directory_add_song(struct directory *directory, struct song *song) { + assert(holding_db_lock()); assert(directory != NULL); assert(song != NULL); assert(song->parent == directory); @@ -197,6 +198,7 @@ void directory_remove_song(G_GNUC_UNUSED struct directory *directory, struct song *song) { + assert(holding_db_lock()); assert(directory != NULL); assert(song != NULL); assert(song->parent == directory); -- cgit v1.2.3