From: Max Kellermann Date: Fri, 17 Mar 2017 21:47:32 +0000 (+0100) Subject: mpdclient: move code to mpdclient_invoke_error_callback() X-Git-Tag: v0.26~57 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c907d716a411734032774361604f54222564cbb9;p=ncmpc.git mpdclient: move code to mpdclient_invoke_error_callback() --- diff --git a/src/mpdclient.c b/src/mpdclient.c index 8177efa..c8351d1 100644 --- a/src/mpdclient.c +++ b/src/mpdclient.c @@ -25,6 +25,15 @@ #include +#include + +static void +mpdclient_invoke_error_callback(gcc_unused enum mpd_error error, + const char *message) +{ + mpdclient_error_callback(message); +} + /****************************************************************************/ /*** mpdclient functions ****************************************************/ /****************************************************************************/ @@ -41,7 +50,8 @@ mpdclient_handle_error(struct mpdclient *c) mpdclient_auth_callback(c)) return true; - mpdclient_error_callback(mpd_connection_get_error_message(c->connection)); + mpdclient_invoke_error_callback(error, + mpd_connection_get_error_message(c->connection)); if (!mpd_connection_clear_error(c->connection)) mpdclient_disconnect(c);