curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: Ending libcurl when EVT_QUERY_END_SESSION received

From: Ray Satiro via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 27 Sep 2018 14:11:06 -0400

On 9/26/2018 5:00 AM, Daniel Stenberg via curl-library wrote:
> On Tue, 25 Sep 2018, acorn12 via curl-library wrote:
>
>> Looking through the error codes fro libcurl, I cannot find any way to
>> ensure that the error code I am intending to return from the
>> callbacks will not conflict with any other libcurl error code.
>
> CURLE_ABORTED_BY_CALLBACK ?
>
> If that's not good enough, all callbacks get a custom private pointer
> passed in to them so you can easily set your own flag/error code in
> your own structs to pass on whatever data you need.

I'm not sure if that's what he's asking, it reads like he is quoting
from the FAQ and wants to know what to return from the callbacks to
abort, and that depends on the callback [1][2][3]. To be clear handle
when libcurl returns CURLE_ABORTED_BY_CALLBACK but do not return it
yourself from the callbacks.

[1]: https://curl.haxx.se/libcurl/c/CURLOPT_READFUNCTION.html
[2]: https://curl.haxx.se/libcurl/c/CURLOPT_WRITEFUNCTION.html
[3]: https://curl.haxx.se/libcurl/c/CURLOPT_XFERINFOFUNCTION.html

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2018-09-27