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.
This commit is contained in:
parent
f168695699
commit
7125fdc4f2
@ -190,14 +190,17 @@ void setQueueState(enum player_queue_state queueState)
|
|||||||
|
|
||||||
void playerQueueLock(void)
|
void playerQueueLock(void)
|
||||||
{
|
{
|
||||||
if (pc.queueLockState == PLAYER_QUEUE_UNLOCKED)
|
assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED);
|
||||||
player_command(PLAYER_COMMAND_LOCK_QUEUE);
|
player_command(PLAYER_COMMAND_LOCK_QUEUE);
|
||||||
|
assert(pc.queueLockState == PLAYER_QUEUE_LOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
void playerQueueUnlock(void)
|
void playerQueueUnlock(void)
|
||||||
{
|
{
|
||||||
if (pc.queueLockState == PLAYER_QUEUE_LOCKED)
|
if (pc.queueLockState == PLAYER_QUEUE_LOCKED)
|
||||||
player_command(PLAYER_COMMAND_UNLOCK_QUEUE);
|
player_command(PLAYER_COMMAND_UNLOCK_QUEUE);
|
||||||
|
|
||||||
|
assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
int playerSeek(int fd, Song * song, float seek_time)
|
int playerSeek(int fd, Song * song, float seek_time)
|
||||||
|
Loading…
Reference in New Issue
Block a user