aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-06-13 21:23:34 +0200
committerMax Kellermann <max@duempel.org>2012-06-13 21:26:32 +0200
commit9f3db5a70b4181fef6a70ef84b70fdd5b3c3e451 (patch)
tree2e98f6d2adb18cb97320a4622bd5869d42a34c69 /src/directory.c
parent1a59730782bffe91d4d136cee5c65f9f5726bb75 (diff)
downloadmpd-9f3db5a70b4181fef6a70ef84b70fdd5b3c3e451.tar.gz
mpd-9f3db5a70b4181fef6a70ef84b70fdd5b3c3e451.tar.xz
mpd-9f3db5a70b4181fef6a70ef84b70fdd5b3c3e451.zip
directory: require db lock for _{add,remove}_song()
Diffstat (limited to 'src/directory.c')
-rw-r--r--src/directory.c2
1 files changed, 2 insertions, 0 deletions
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);