Revert "curl_xml.c: avoid using uninitalized variable in error message"
[collectd.git] / src / curl_xml.c
index 77aee60..b941f02 100644 (file)
@@ -550,13 +550,14 @@ static int cx_curl_perform (cx_t *db, CURL *curl) /* {{{ */
   long rc;
   char *ptr;
   char *url;
+  url = db->url;
 
-  db->buffer_fill = 0;
+  db->buffer_fill = 0; 
   status = curl_easy_perform (curl);
   if (status != CURLE_OK)
   {
-    ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s",
-           status, db->curl_errbuf);
+    ERROR ("curl_xml plugin: curl_easy_perform failed with status %i: %s (%s)",
+           status, db->curl_errbuf, url);
     return (-1);
   }