Code

use mpdclient_finish_command at the obvious places
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Thu, 3 Nov 2011 23:20:45 +0000 (00:20 +0100)
committerJonathan Neuschäfer <j.neuschaefer@gmx.net>
Mon, 14 Nov 2011 21:29:22 +0000 (22:29 +0100)
src/screen_artist.c
src/screen_file.c
src/screen_outputs.c

index 3ae214545ff3b1766f3859529be494c5ae60f6bc..0b460a186cde08b68434749061f53d9e8321b624 100644 (file)
@@ -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);
 }
index 73f56005f51f244ca26d4972c9441846931ddb36..515937750980757325ab5aedeb6dd18dfd3e101c 100644 (file)
@@ -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
index af0b2d35b96bbba812c4ce4da3037cc36e068ede..e32a83b3fc3c9e454aea9d5c2590bca570978baa 100644 (file)
@@ -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);
 }