From b616dff77d8e0d7a930327007690444a356dcbf3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:44:34 +0200 Subject: no commandError() in playerSeek() We should avoid having protocol specific code in player.c. Just return success or failure, and let the caller send the error code to the MPD client. --- src/player.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/player.c') diff --git a/src/player.c b/src/player.c index 8803cdfd..8687e540 100644 --- a/src/player.c +++ b/src/player.c @@ -19,7 +19,6 @@ #include "player.h" #include "player_thread.h" #include "path.h" -#include "command.h" #include "ack.h" #include "os_compat.h" #include "main_notify.h" @@ -197,15 +196,12 @@ void playerQueueUnlock(void) assert(pc.queueLockState == PLAYER_QUEUE_UNLOCKED); } -int playerSeek(int fd, Song * song, float seek_time) +int playerSeek(Song * song, float seek_time) { assert(song != NULL); - if (pc.state == PLAYER_STATE_STOP) { - commandError(fd, ACK_ERROR_PLAYER_SYNC, - "player not currently playing"); + if (pc.state == PLAYER_STATE_STOP) return -1; - } if (pc.next_song != song) set_current_song(song); -- cgit v1.2.3