cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Empty error message "Error setting curl:"

From: Brilliantov Kirill Vladimirovich <brilliantov_at_byterg.ru>
Date: Mon, 11 Feb 2013 11:47:58 +0400

Hello!
I think I found problem.
CurlFTPFS set CURLOPT_FTP_SSL option, but I buld curl without SSL support.
I not understand another - CurlFTPFS set CURLOPT_ERRORBUFFER to
error_buf (static char error_buf[CURL_ERROR_SIZE]) and use follow define
for set curl options:
#define curl_easy_setopt_or_die(handle, option, ...) \
   do {\
     CURLcode res = curl_easy_setopt(handle, option, __VA_ARGS__);\
     if (res != CURLE_OK) {\
       fprintf(stderr, "Error setting curl: %s (%d)\n", error_buf,
__LINE__);\
       exit(1);\
     }\
   }while(0)
I add output line number for found error place.
Why I not get human readable error messages if CURLOPT_ERRORBUFFER point
to buffer for error message?

-- 
Best regards,
Brilliantov Kirill Vladimirovich
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-11