summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2017-06-05 13:05:33 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2017-06-05 13:05:33 +0200
commit0541b7e179e389c154b4179483b38e1a860b3946 (patch)
treed2db4f0fabdacc4808adfee472fa4d5c6bd2d53d
parent99f2117d4c663855fa933308388446671b1fa734 (diff)
downloadnncmpp-0541b7e179e389c154b4179483b38e1a860b3946.tar.gz
nncmpp-0541b7e179e389c154b4179483b38e1a860b3946.tar.xz
nncmpp-0541b7e179e389c154b4179483b38e1a860b3946.zip
Uncapitalize cURL errors
-rw-r--r--nncmpp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/nncmpp.c b/nncmpp.c
index 14059c3..7f4e390 100644
--- a/nncmpp.c
+++ b/nncmpp.c
@@ -149,6 +149,13 @@ latin1_to_utf8 (const char *latin1)
return str_steal (&converted);
}
+static void
+cstr_uncapitalize (char *s)
+{
+ if (isupper (s[0]) && islower (s[1]))
+ s[0] = tolower_ascii (s[0]);
+}
+
static int
print_curl_debug (CURL *easy, curl_infotype type, char *data, size_t len,
void *ud)
@@ -2366,6 +2373,7 @@ streams_tab_on_downloaded (CURLMsg *msg, struct poller_curl_task *task)
if (msg->data.result
&& msg->data.result != CURLE_WRITE_ERROR)
{
+ cstr_uncapitalize (self->curl.curl_error);
print_error ("%s", self->curl.curl_error);
return;
}