summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 41ab418)
raw | patch | inline | side by side (parent: 41ab418)
author | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 17 Mar 2017 21:24:24 +0000 (22:24 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Fri, 17 Mar 2017 21:41:28 +0000 (22:41 +0100) |
src/callbacks.c | patch | blob | history | |
src/callbacks.h | patch | blob | history | |
src/mpdclient.c | patch | blob | history |
diff --git a/src/callbacks.c b/src/callbacks.c
index dd5d15ba6cc1af9b5710be2972802d5761309ace..e12268227586640528e63cf7232913c2dea9bb55 100644 (file)
--- a/src/callbacks.c
+++ b/src/callbacks.c
#include "charset.h"
static bool
-_screen_auth(struct mpdclient *c, gint recursion)
+_mpdclient_auth_callback(struct mpdclient *c, gint recursion)
{
struct mpd_connection *connection = mpdclient_get_connection(c);
if (connection == NULL)
if (mpd_connection_get_error(connection) == MPD_ERROR_SERVER &&
mpd_connection_get_server_error(connection) == MPD_SERVER_ERROR_PASSWORD)
- return _screen_auth(c, ++recursion);
+ return _mpdclient_auth_callback(c, ++recursion);
return true;
}
bool
-screen_auth(struct mpdclient *c)
+mpdclient_auth_callback(struct mpdclient *c)
{
- return _screen_auth(c, 0);
+ return _mpdclient_auth_callback(c, 0);
}
void
-mpdclient_ui_error(const char *message_utf8)
+mpdclient_error_callback(const char *message_utf8)
{
char *message_locale = utf8_to_locale(message_utf8);
screen_status_printf("%s", message_locale);
diff --git a/src/callbacks.h b/src/callbacks.h
index 2dbe9ba1fa942081de0df818ded9ac989833c400..2bc84732aaac373e067926127fdfee344972b337 100644 (file)
--- a/src/callbacks.h
+++ b/src/callbacks.h
* display an error message.
*/
void
-mpdclient_ui_error(const char *message);
+mpdclient_error_callback(const char *message);
bool
-screen_auth(struct mpdclient *c);
+mpdclient_auth_callback(struct mpdclient *c);
#endif
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 7ef34d2a592f0fd3f9e47ff1e9bb61fbcf913f11..582d302b7b5c78155708a38fac684933bb07be51 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
if (error == MPD_ERROR_SERVER &&
mpd_connection_get_server_error(c->connection) == MPD_SERVER_ERROR_PERMISSION &&
- screen_auth(c))
+ mpdclient_auth_callback(c))
return true;
- mpdclient_ui_error(mpd_connection_get_error_message(c->connection));
+ mpdclient_error_callback(mpd_connection_get_error_message(c->connection));
if (!mpd_connection_clear_error(c->connection))
mpdclient_disconnect(c);