cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: CURLE_ABORTED_BY_CALLBACK disconnects FTP session

From: Luís Pinto <luis.pinto_at_avid.com>
Date: Thu, 4 Sep 2014 08:49:11 +0000

Replying to my own email..

I Just forgot to say that the version being used is 7.37.1 (I believe the last stable one)

regards

Luís Pinto
Principal Software Development Engineer,

Avid
Paul-Heyse-Str. 29
80336 Munich
Germany
luis.pinto_at_avid.com 

t +49 89 50206 156
We're Avid.  Learn more at www.avid.com 

-----Original Message-----
From: Luís Pinto
Sent: Wednesday, 3 de September de 2014 18:57
To: 'curl-library_at_cool.haxx.se'
Subject: CURLE_ABORTED_BY_CALLBACK disconnects FTP session

Hi All,

I'm currently using lib-curl for a project where I might need to abort a pending transfer several times. I've followed all the instructions regarding the registrations of the proper callback as shown below

// Pass callback to notify curl if should abort or not m_curlErrorCode = ::curl_easy_setopt (m_curl, CURLOPT_XFERINFOFUNCTION, MyClass::checkCurlCancelingCallback);
m_curlErrorCode = ::curl_easy_setopt (m_curl, CURLOPT_XFERINFODATA, this); m_curlErrorCode = ::curl_easy_setopt (m_curl, CURLOPT_NOPROGRESS, 0);

curl_easy _perform is then executed in its own thread..

In the parent thread, I'm able to set a given variable (properly protected with mutexes) to true, making the checkCurlCancelingCallback return 1 (effectively cancelling any transfer)

Curl_easy_perform returns almost immediately with the proper CURLE_ABORTED_BY_CALLBACK error code..

So far so good.. The main problem is that I wish to reuse the previous connection, and curl simply disconnects from the server...

I want to be able to reuse the connection from that handle several times in a session, and not open several sessions with that handle in case I have to abort any transfers being done there

I this by curls design?

The FTP server that I'm currently using is the FileZilla server

Any help would be greatly appreciated!

Luís Pinto

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-09-04