From: Max Kellermann Date: Thu, 11 Jun 2009 13:18:26 +0000 (+0200) Subject: mpdclient: finish the "status" command in mpdclient_cmd_crop() X-Git-Tag: release-0.15~60 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8242fe74f64cb509c035272ac9b9780fd36d1d52;p=ncmpc.git 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. --- 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) {