On Mon, Dec 08, 2014 at 10:46:44PM -0500, John Coffey wrote:
> after much debugging and sprinkling of printouts on our target platform, it
> turns out that the source of the bug was 75% an application problem (mine) and
> 25% (in my opinion) an libCurl issue due to the weakness of using loosely
> coupled va_args to extract arguments from a variable length argument list 
> while
> setting libCurl options.  The problem had to do with an implicit 'long long' 
> to
> 'long' conversion and also (I believe an Endian related issue on the PowerPC
> platform that was not an issue on windows).

CURLOPT_FTP_RESPONSE_TIMEOUT (formerly CURLOPT_SERVER_RESPONSE_TIMEOUT) is
documented to take a long. There's no ambiguity about that. Since
curl_easy_setopt uses varargs, there's not much choice other than casting
in this situation, or with any other argument to curl_easy_setopt that doesn't
match the requested type.  I'm glad you found the source of problems in your
program, but as the man page for curl_easy_setopt says:

  Read this manual carefully as bad input values may cause
  libcurl to behave badly!  

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to