diff options
author | Max Kellermann <max@duempel.org> | 2009-01-15 16:12:11 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-15 16:16:53 +0100 |
commit | fa3899f7b0e6c3250f3cb38ac4f9a07d0ab80874 (patch) | |
tree | cade2df06b9d2e3d794522ac99ad044d4affd78f | |
parent | 09e06d941624b6e69b4a54a41c23b93292a354d6 (diff) | |
download | mpd-fa3899f7b0e6c3250f3cb38ac4f9a07d0ab80874.tar.gz mpd-fa3899f7b0e6c3250f3cb38ac4f9a07d0ab80874.tar.xz mpd-fa3899f7b0e6c3250f3cb38ac4f9a07d0ab80874.zip |
input_curl: call curl_multi_info_read() in constructor
To check for early connect failures, call curl_multi_info_read() in
the constructor input_curl_open(). This fixes an assertion failure.
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/input_curl.c | 6 |
2 files changed, 7 insertions, 0 deletions
@@ -26,6 +26,7 @@ MPD 0.14.1 - not yet released * input_curl: - use select() to eliminate busy loop during connect - honour http_proxy_* config directives + - fix assertion failure on "connection refused" * log: automatically append newline * fix setenv() conflict on Solaris * configure.ac: check for pkg-config before using it diff --git a/src/input_curl.c b/src/input_curl.c index d3bc219c8..8372f9924 100644 --- a/src/input_curl.c +++ b/src/input_curl.c @@ -926,6 +926,12 @@ input_curl_open(struct input_stream *is, const char *url) return false; } + ret = input_curl_multi_info_read(is); + if (!ret) { + input_curl_free(is); + return false; + } + return true; } |