Den 23-07-2013 22:17, Daniel Stenberg skrev:
On Tue, 23 Jul 2013, Byrial Jensen wrote:

I have a problem with curl_formadd() which I suspect is a bug:

fails with CURLcode 2 (CURLE_FAILED_INIT) which I do not understand.

First, this is a minor mistake. curl_formadd() does not return the
general libcurl error code! It returns a CURLFORMcode and a 2 there
equals CURL_FORMADD_OPTION_TWICE ...

Is this a bug or did I do something wrong?

It is quite clearly a bug, and I've attached my suggested patch for
fixing this problem.
>
> Comments?

Thank you very much for the fast reply, and thank you for pointing out that I had not remarked that curl_formadd() returns a CURLFORMcode instead of a CURLcode.

Without a function like the non-existing "const char *curl_form_strerror(CURLFORMcode)" I will have to just write the numerical error code in my error function.

I am new to libcurl and not able to comment on the patch. For now (until I can get a package with the fix) I will continue to use FORMADD_COPYNAME as a workaround instead of building curllib myself with the patch.

Regards,
- Byrial

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

Reply via email to