aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-08-26 08:27:17 +0200
committerMax Kellermann <max@duempel.org>2008-08-26 08:27:17 +0200
commit7125fdc4f24176997e68e5e6923ca6df685cf159 (patch)
tree210cc840dd3ab67e9faee4a177e47872489cd39b /src
parentf16869569991b17670654aa986cd2f564b519c34 (diff)
assert locked/unlocked in queue lock functions
There are no nested queue locks in mpd, thus replace the locked checks in playerQueueLock(), playerQueueUnlock() with assertions.
Diffstat (limited to 'src')
-rw-r--r--src/player.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/player.c b/src/player.c
index ba424d1d..6a2c3a08 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)