There are no nested queue locks in mpd, thus replace the locked checks in playerQueueLock(), playerQueueUnlock() with assertions. ---
src/player.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/player.c b/src/player.c index ba424d1..6a2c3a0 100644 --- a/src/player.c +++ b/src/player.c @@ -190,14 +190,17 @@ void setQueueState(enum player_queue_state queueState) void playerQueueLock(void) { - if (pc.queueLockState == PLAYER_QUEUE_UNLOCKED) - player_command(PLAYER_COMMAND_LOCK_QUEUE); + assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED); + player_command(PLAYER_COMMAND_LOCK_QUEUE); + assert(pc.queueLockState == PLAYER_QUEUE_LOCKED); } void playerQueueUnlock(void) { if (pc.queueLockState == PLAYER_QUEUE_LOCKED) player_command(PLAYER_COMMAND_UNLOCK_QUEUE); + + assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED); } int playerSeek(int fd, Song * song, float seek_time) ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Musicpd-dev-team mailing list Musicpd-dev-team@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team