From 37c8f5c1da33f1e0fc2352582855984b0df7bd95 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 25 Aug 2011 08:43:05 +0200 Subject: input/curl: set GError when init() fails Let the caller know what happened, he's responsible for logging. --- src/input/curl_input_plugin.c | 5 +++-- 1 file 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; } -- cgit v1.2.3