summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fca2567)
raw | patch | inline | side by side (parent: fca2567)
author | Max Kellermann <max@duempel.org> | |
Fri, 2 Oct 2009 07:35:23 +0000 (09:35 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 2 Oct 2009 07:35:23 +0000 (09:35 +0200) |
If mpd_connection_clear_error() fails, revert to
mpdclient_handle_error().
mpdclient_handle_error().
src/screen_client.c | patch | blob | history |
diff --git a/src/screen_client.c b/src/screen_client.c
index 9d60ed2cd6943cbd018653fdcc0bc4338d53ffc9..9e13ba00e3ebf9a092f8062aa7d2695c9390d2c9 100644 (file)
--- a/src/screen_client.c
+++ b/src/screen_client.c
id = mpd_run_update(c->connection, path);
if (id == 0) {
if (mpd_connection_get_error(c->connection) == MPD_ERROR_SERVER &&
- mpd_connection_get_server_error(c->connection) == MPD_SERVER_ERROR_UPDATE_ALREADY) {
+ mpd_connection_get_server_error(c->connection) == MPD_SERVER_ERROR_UPDATE_ALREADY &&
+ mpd_connection_clear_error(c->connection))
screen_status_printf(_("Database update running..."));
- mpd_connection_clear_error(c->connection);
- } else
+ else
mpdclient_handle_error(c);
return;
}