[evolution-kolab/ek-wip-xfb: 1/2] libekolabutil: print verbose Curl	error messages
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [evolution-kolab/ek-wip-xfb: 1/2] libekolabutil: print verbose Curl	error messages
- Date: Mon, 22 Oct 2012 17:43:05 +0000 (UTC)
commit 246b43d7095c35e9a2012a4c1e4bca07c1505aff
Author: Christian Hilberg <hilberg kernelconcepts de>
Date:   Mon Oct 22 15:42:46 2012 +0200
    libekolabutil: print verbose Curl error messages
    
    * instead of logging the mere CURLcode, also retrieve
      the error message for the code from libcurl and log
      it
 src/libekolabutil/kolab-util-http.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/src/libekolabutil/kolab-util-http.c b/src/libekolabutil/kolab-util-http.c
index df39968..a11ae86 100644
--- a/src/libekolabutil/kolab-util-http.c
+++ b/src/libekolabutil/kolab-util-http.c
@@ -278,8 +278,9 @@ util_http_curl_get (KolabUtilHttpJob *job, GError **error)
 		g_set_error (error,
 		             KOLAB_UTIL_HTTP_ERROR,
 		             KOLAB_UTIL_HTTP_ERROR_CONFIGURATION_ERROR,
-		             _("Configuring libcurl failed with CURLcode: %u"),
-		             curlcode);
+		             _("Configuring libcurl failed with CURLcode: %u (%s)"),
+		             curlcode,
+		             curl_easy_strerror (curlcode));
 		return -1;
 	}
 
@@ -300,8 +301,9 @@ util_http_curl_get (KolabUtilHttpJob *job, GError **error)
 		g_set_error (error,
 		             KOLAB_UTIL_HTTP_ERROR,
 		             error_code,
-		             _("Access to URL '%s' failed in libcurl with CURLcode: %u"),
-		             camel_url_to_string (job->url, CAMEL_URL_HIDE_AUTH), curlcode);
+		             _("Access to URL '%s' failed in libcurl with CURLcode: %u (%s)"),
+		             camel_url_to_string (job->url, CAMEL_URL_HIDE_AUTH),
+		             curlcode, curl_easy_strerror (curlcode));
 	}
 	else {
 		nbytes = (gssize)job->buffer->len;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]