Commit 37c8f5c1 authored by Max Kellermann's avatar Max Kellermann

input/curl: set GError when init() fails

Let the caller know what happened, he's responsible for logging.
parent 5bba2df5
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment