From: Jonathan Neuschäfer Date: Sat, 29 Oct 2011 13:19:02 +0000 (+0200) Subject: mpdclient: handle mpd_send_add's return value X-Git-Tag: release-0.20~60^2~3 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8bfc36da1e7099cb7a1d8d445f967da8e5e3474e;p=ncmpc.git mpdclient: handle mpd_send_add's return value --- diff --git a/src/mpdclient.c b/src/mpdclient.c index 24ac897..637aef7 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -412,8 +412,8 @@ mpdclient_cmd_add_path(struct mpdclient *c, const gchar *path_utf8) if (connection == NULL) return false; - mpd_send_add(connection, path_utf8); - return mpdclient_finish_command(c); + return mpd_send_add(connection, path_utf8)? + mpdclient_finish_command(c) : false; } bool