cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: multi interface is broken with active FTP connection

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 26 Oct 2011 23:08:25 +0200 (CEST)

On Wed, 26 Oct 2011, Yang Tse wrote:

> Test case 589 (pushed disabled) exhibits the issue or a close related one. I
> haven't debugged it further but it seems to not return from
> curl_multi_perform() on iteration number 8 or 9.

Thanks, but I can't spot the same problem with 589.

The problem with 589 hanging is simply that CURLOPT_READDATA isn't set so it
gets stuck trying to read from stdin. When I made it read from the provided
file it worked fine and it then acts pretty much identically to test 588 for
me and I can't see any timeouts...

I used this patch:

--- a/tests/libtest/lib589.c
+++ b/tests/libtest/lib589.c
@@ -37,6 +37,7 @@ int test(char *URL)
    int running;
    int msgs_left;
    CURLMsg *msg;
+ FILE *upload = NULL;

    start_test_timing();

@@ -44,10 +45,13 @@ int test(char *URL)

    easy_init(easy);

+ upload = fopen(libtest_arg2, "rb");
+
    easy_setopt(easy, CURLOPT_URL, URL);
    easy_setopt(easy, CURLOPT_VERBOSE, 1L);
    easy_setopt(easy, CURLOPT_UPLOAD, 1L);
    easy_setopt(easy, CURLOPT_FTPPORT, "-");
+ easy_setopt(easy, CURLOPT_READDATA, upload);

    multi_init(multi);

@@ -106,5 +110,7 @@ test_cleanup:
    curl_easy_cleanup(easy);
    curl_global_cleanup();

+ fclose(upload);
+
    return res;
  }

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-10-26