Dmitriy Sergeyev found and fixed a multi interface flaw when using asynch
authorDaniel Stenberg <daniel@haxx.se>
Thu, 31 Aug 2006 12:53:39 +0000 (12:53 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 31 Aug 2006 12:53:39 +0000 (12:53 +0000)
name resolves. It could get stuck in the wrong state.

CHANGES
RELEASE-NOTES
lib/multi.c

diff --git a/CHANGES b/CHANGES
index b3f7f8e..1d8c39b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -7,6 +7,10 @@
                                   Changelog
 
 
+Daniel (31 August 2006)
+- Dmitriy Sergeyev found and fixed a multi interface flaw when using asynch
+  name resolves. It could get stuck in the wrong state.
+
 Gisle (29 August 2006)
 - Added support for other MS-DOS compilers (desides djgpp). All MS-DOS
   compiler now uses the same config.dos file (renamed to config.h by
index 70689ce..05fe3b1 100644 (file)
@@ -11,12 +11,14 @@ Curl and libcurl 7.15.6
 
 This release includes the following changes:
 
+ o Added support for other MS-DOS compilers (desides djgpp)
  o CURLOPT_SOCKOPTFUNCTION and CURLOPT_SOCKOPTDATA were added
  o (FTP) libcurl avoids sending TYPE if the desired type was already set
  o (FTP) CURLOPT_PREQUOTE works even when CURLOPT_NOBODY is set true
 
 This release includes the following bugfixes:
 
+ o multi interface using asynch resolves could get stuck in wrong state
  o the 'running_handles' counter wasn't always updated properly when
    curl_multi_remove_handle() was used
  o (FTP) EPRT transfers with IPv6 didn't work properly
@@ -31,12 +33,13 @@ Other curl-related news:
 
 New curl mirrors:
 
+ o http://curl.geosdreams.info/ is a new Polish mirror
  o http://curl.gfiles.org/ is a new Russian mirror
 
 This release would not have looked like this without help, code, reports and
 advice from friends like these:
 
  Domenico Andreoli, Armel Asselin, Gisle Vanem, Yang Tse, Andrew Biggs,
- Peter Sylvester, David McCreedy
+ Peter Sylvester, David McCreedy, Dmitriy Sergeyev
 
         Thanks! (and sorry if I forgot to mention someone)
index c1ff12e..01891b5 100644 (file)
@@ -639,8 +639,12 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
              is already freed and gone */
           easy->easy_conn = NULL;           /* no more connection */
         else {
-          /* FIX: what if protocol_connect is TRUE here?! */
-          multistate(easy, CURLM_STATE_WAITCONNECT);
+          /* call again please so that we get the next socket setup */
+          result = CURLM_CALL_MULTI_PERFORM;
+          if(protocol_connect)
+            multistate(easy, CURLM_STATE_DO);
+          else
+            multistate(easy, CURLM_STATE_WAITCONNECT);
         }
       }