From 8242fe74f64cb509c035272ac9b9780fd36d1d52 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 11 Jun 2009 15:18:26 +0200 Subject: [PATCH] mpdclient: finish the "status" command in mpdclient_cmd_crop() The crop function calls mpd_getStatus(), but never finishes that command. There's a mpdclient_finish_command() call at the end of the function, but that is supposed to finish the delete command list. --- src/mpdclient.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mpdclient.c b/src/mpdclient.c index fecdf49..7a9b661 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -283,11 +283,16 @@ mpdclient_cmd_pause(mpdclient_t *c, gint value) gint mpdclient_cmd_crop(mpdclient_t *c) { + gint error; mpd_Status *status; int length; mpd_sendStatusCommand(c->connection); status = mpd_getStatus(c->connection); + error = mpdclient_finish_command(c); + if (error) + return error; + length = status->playlistLength - 1; if (length <= 0) { -- 2.30.2