Re: Empty error message Error setting curl:
On Mon, 11 Feb 2013, Brilliantov Kirill Vladimirovich wrote: #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? libcurl *may* store error message there - which is explained by the man page. A slightly better approach for that macro would be to check for a zero-length string there and if so, use curl_easy_strerror() to get a decent message to show. Or just show the error code. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: Empty error message Error setting curl:
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
Re: Empty error message Error setting curl:
On Fri, 8 Feb 2013, Brilliantov Kirill Vladimirovich wrote: Yes, this is problem with curlftpfs, but may be you help me increase curl output? CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION are fairly good ways to get info out from libcurl. -- / daniel.haxx.se --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: Empty error message Error setting curl:
Daniel Stenberg wrote on 02/08/2013 05:11 PM: CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION are fairly good ways to get info out from libcurl. Hello, Daniel! I found what CURLOPT_VERBOSE used in curlftpfs: $ grep CURLOPT_VERBOSE -rnI -C1 . ./ftpfs.c-1544- if (ftpfs.verbose) { ./ftpfs.c:1545:curl_easy_setopt_or_die(easy, CURLOPT_VERBOSE, TRUE); ./ftpfs.c-1546- } Why I not get verbose output if this options in use? -- Best regards, Brilliantov Kirill Vladimirovich --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html
Re: Empty error message Error setting curl:
On 8 February 2013 15:56, Brilliantov Kirill Vladimirovich brillian...@byterg.ru wrote: Daniel Stenberg wrote on 02/08/2013 05:11 PM: CURLOPT_VERBOSE and CURLOPT_DEBUGFUNCTION are fairly good ways to get info out from libcurl. Hello, Daniel! I found what CURLOPT_VERBOSE used in curlftpfs: $ grep CURLOPT_VERBOSE -rnI -C1 . ./ftpfs.c-1544- if (ftpfs.verbose) { ./ftpfs.c:1545:curl_easy_setopt_or_die(easy, CURLOPT_VERBOSE, TRUE); ./ftpfs.c-1546- } Why I not get verbose output if this options in use? I think you'll have to ask the ftpfs developers that. -- Michael Wood esiot...@gmail.com --- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html