cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] #1184 SMTP: libcurl hangs when returning CURL_READFUNC_ABORT from readfunc callback

From: Patricia Muscalu <booboo0706_at_users.sf.net>
Date: Thu, 31 Jan 2013 08:44:11 +0000

The following patch seems to solve the problem. Could you have a look at the patch? Thanks.

diff --git a/lib/url.c b/lib/url.c
index 80c8a997e39891d567a71d7d77bc8de62bf7e25b..40b420b0821804c23b9eaaa2798fe58a3692d582 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -5174,7 +5174,12 @@ CURLcode Curl_done(struct connectdata **connp,
   */
   if(data->set.reuse_forbid || conn->bits.close || premature ||
      (-1 == conn->connection_id)) {
- CURLcode res2 = Curl_disconnect(conn, premature); /* close connection */
+ CURLcode res2;
+
+ if(status == CURLE_ABORTED_BY_CALLBACK)
+ premature = TRUE;
+
+ res2 = Curl_disconnect(conn, premature); /* close connection */
 
     /* If we had an error already, make sure we return that one. But
        if we got a new error, return that. */

---
** [bugs:#1184] SMTP: libcurl hangs when returning CURL_READFUNC_ABORT from readfunc callback**
**Status:** open
**Created:** Fri Jan 25, 2013 10:30 AM UTC by Patricia Muscalu
**Last Updated:** Mon Jan 28, 2013 08:55 AM UTC
**Owner:** nobody
The problem appears in 7.24 (I've not tested the earlier versions of libcurl).
The problem can also be reproduces with libcurl 7.28. 
---
Sent from sourceforge.net because you indicated interest in <https://sourceforge.net/p/curl/bugs/1184/>
To unsubscribe from further messages, please visit <https://sourceforge.net/auth/prefs/>
Received on 2013-01-31

These mail archives are generated by hypermail.

donate! Page updated January 05, 2012.
web site info

File upload with ASP.NET