summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f1a456c)
raw | patch | inline | side by side (parent: f1a456c)
author | Max Kellermann <max.kellermann@gmail.com> | |
Sat, 25 Mar 2017 19:53:35 +0000 (20:53 +0100) | ||
committer | Max Kellermann <max.kellermann@gmail.com> | |
Sat, 25 Mar 2017 19:53:35 +0000 (20:53 +0100) |
src/mpdclient.c | patch | blob | history |
diff --git a/src/mpdclient.c b/src/mpdclient.c
index 8c18a0c81ab60044db6df587af04e87abc3d2e46..870839fd27dbb69ee8abd1d4b65e79d8c8567ee4 100644 (file)
--- a/src/mpdclient.c
+++ b/src/mpdclient.c
.error = mpdclient_connect_error,
};
+static void
+mpdclient_aconnect_start(struct mpdclient *c,
+ const struct mpd_settings *settings)
+{
+ aconnect_start(&c->async_connect,
+ mpd_settings_get_host(settings),
+ mpd_settings_get_port(settings),
+ &mpdclient_connect_handler, c);
+}
+
#endif
void
mpdclient_disconnect(c);
#ifdef ENABLE_ASYNC_CONNECT
- aconnect_start(&c->async_connect,
- mpd_settings_get_host(c->settings),
- mpd_settings_get_port(c->settings),
- &mpdclient_connect_handler, c);
+ mpdclient_aconnect_start(c, c->settings);
#else
/* connect to MPD */
struct mpd_connection *connection =