From: Jonathan Neuschäfer Date: Thu, 3 Nov 2011 23:20:45 +0000 (+0100) Subject: use mpdclient_finish_command at the obvious places X-Git-Tag: release-0.20~52 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8da666bb48b811fbeed770eaac9a4942e9f53907;p=ncmpc.git use mpdclient_finish_command at the obvious places --- diff --git a/src/screen_artist.c b/src/screen_artist.c index 3ae2145..0b460a1 100644 --- a/src/screen_artist.c +++ b/src/screen_artist.c @@ -162,8 +162,7 @@ load_artist_list(struct mpdclient *c) mpd_search_commit(connection); recv_tag_values(connection, MPD_TAG_ARTIST, artist_list); - if (!mpd_response_finish(connection)) - mpdclient_handle_error(c); + mpdclient_finish_command(c); } /* sort list */ @@ -193,8 +192,7 @@ load_album_list(struct mpdclient *c) recv_tag_values(connection, MPD_TAG_ALBUM, album_list); - if (!mpd_response_finish(connection)) - mpdclient_handle_error(c); + mpdclient_finish_command(c); } /* sort list */ @@ -228,8 +226,7 @@ load_song_list(struct mpdclient *c) filelist_recv(browser.filelist, connection); - if (!mpd_response_finish(connection)) - mpdclient_handle_error(c); + mpdclient_finish_command(c); } /* fix highlights */ @@ -481,10 +478,8 @@ add_query(struct mpdclient *c, enum mpd_tag_type table, const char *_filter, addlist = filelist_new_recv(connection); - if (mpd_response_finish(connection)) + if (mpdclient_finish_command(c)) mpdclient_filelist_add_all(c, addlist); - else - mpdclient_handle_error(c); filelist_free(addlist); } diff --git a/src/screen_file.c b/src/screen_file.c index 73f5600..5159377 100644 --- a/src/screen_file.c +++ b/src/screen_file.c @@ -63,10 +63,8 @@ screen_file_load_list(struct mpdclient *c, struct filelist *filelist) mpd_send_list_meta(connection, current_path); filelist_recv(filelist, connection); - if (mpd_response_finish(connection)) + if (mpdclient_finish_command(c)) filelist_sort_dir_play(filelist, compare_filelist_entry_path); - else - mpdclient_handle_error(c); } static void diff --git a/src/screen_outputs.c b/src/screen_outputs.c index af0b2d3..e32a83b 100644 --- a/src/screen_outputs.c +++ b/src/screen_outputs.c @@ -130,8 +130,7 @@ fill_outputs_list(struct mpdclient *c) g_ptr_array_add(mpd_outputs, output); } - if (!mpd_response_finish(connection)) - mpdclient_handle_error(c); + mpdclient_finish_command(c); list_window_set_length(lw, mpd_outputs->len); }