aboutsummaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-08-16 00:29:10 +0200
committerMax Kellermann <max@duempel.org>2012-08-16 00:29:25 +0200
commit31009bb1f6052fb3c6a41e3a97fdf09405cd577d (patch)
tree0758a49121a73b31a8f89b115d595d469112c1ce /src/db
parent3b8532f3fb379c7ecc6b64eecbbf9c824d18e875 (diff)
ProxyDatabase: clear libmpdclient errors in CheckError()
Auto-recover from soft errors.
Diffstat (limited to 'src/db')
-rw-r--r--src/db/ProxyDatabasePlugin.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/db/ProxyDatabasePlugin.cxx b/src/db/ProxyDatabasePlugin.cxx
index e27ca829..5604daf1 100644
--- a/src/db/ProxyDatabasePlugin.cxx
+++ b/src/db/ProxyDatabasePlugin.cxx
@@ -120,7 +120,7 @@ Convert(enum tag_type tag_type)
}
static bool
-CheckError(const struct mpd_connection *connection, GError **error_r)
+CheckError(struct mpd_connection *connection, GError **error_r)
{
const auto error = mpd_connection_get_error(connection);
if (error == MPD_ERROR_SUCCESS)
@@ -128,6 +128,7 @@ CheckError(const struct mpd_connection *connection, GError **error_r)
g_set_error_literal(error_r, libmpdclient_quark(), (int)error,
mpd_connection_get_error_message(connection));
+ mpd_connection_clear_error(connection);
return false;
}