]>
Commit | Line | Data |
---|---|---|
2056dd30 AM |
1 | From cde09b547abbeb7595d91259fcc628504d0f55a9 Mon Sep 17 00:00:00 2001 |
2 | From: Marc Fournier <marc.fournier@camptocamp.com> | |
3 | Date: Wed, 8 Jan 2014 18:05:40 +0100 | |
4 | Subject: [PATCH 05/22] Revert "curl_xml.c: avoid using uninitalized variable | |
5 | in error message" | |
6 | ||
7 | This reverts commit bbbf37d55a3959951604c4be482e9a705a0f86d9. | |
8 | ||
9 | A different fix for this problem was commited to the collectd-5.4 branch | |
10 | (8327ee64) and conflicts with this patch. Also, initializing url the | |
11 | same way as 8327ee64 does it, to avoid a merge conflict. | |
12 | --- | |
13 | src/curl_xml.c | 7 ++++--- | |
14 | 1 file changed, 4 insertions(+), 3 deletions(-) | |
15 | ||
16 | diff --git a/src/curl_xml.c b/src/curl_xml.c | |
17 | index 77aee60..b941f02 100644 | |
18 | --- a/src/curl_xml.c | |
19 | +++ b/src/curl_xml.c | |
20 | @@ -550,13 +550,14 @@ static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */ | |
21 | long rc; | |
22 | char *ptr; | |
23 | char *url; | |
24 | + url = db->url; | |
25 | ||
26 | - db->buffer_fill = 0; | |
27 | + db->buffer_fill = 0; | |
28 | status = curl_easy_perform (curl); | |
29 | if (status != CURLE_OK) | |
30 | { | |
31 | - ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s", | |
32 | - status, db->curl_errbuf); | |
33 | + ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s (%s)", | |
34 | + status, db->curl_errbuf, url); | |
35 | return (-1); | |
36 | } | |
37 | ||
38 | -- | |
39 | 1.9.3 | |
40 |