diff options
author | Max Kellermann <max@duempel.org> | 2011-08-25 08:43:05 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-08-25 08:43:05 +0200 |
commit | 37c8f5c1da33f1e0fc2352582855984b0df7bd95 (patch) | |
tree | bfb53b18313769743a2d3fde249fc1e14e69edc3 /src/input | |
parent | 5bba2df526ba47b46da380074cb66de266d7fa80 (diff) | |
download | mpd-37c8f5c1da33f1e0fc2352582855984b0df7bd95.tar.gz mpd-37c8f5c1da33f1e0fc2352582855984b0df7bd95.tar.xz mpd-37c8f5c1da33f1e0fc2352582855984b0df7bd95.zip |
input/curl: set GError when init() fails
Let the caller know what happened, he's responsible for logging.
Diffstat (limited to '')
-rw-r--r-- | src/input/curl_input_plugin.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c index d869a90e4..8307b00be 100644 --- a/src/input/curl_input_plugin.c +++ b/src/input/curl_input_plugin.c @@ -118,8 +118,9 @@ input_curl_init(const struct config_param *param, { CURLcode code = curl_global_init(CURL_GLOBAL_ALL); if (code != CURLE_OK) { - g_warning("curl_global_init() failed: %s\n", - curl_easy_strerror(code)); + g_set_error(error_r, curl_quark(), code, + "curl_global_init() failed: %s\n", + curl_easy_strerror(code)); return false; } |