CURLOPT_FTP_CREATE_MISSING_DIRS在文件上传中

时间:2013-12-15 22:08:03

标签: c++ ftp libcurl

我有这个上传整个目录的应用程序。我正在考虑做一个关于CURLOPT_FTP_CREATE_MISSING_DIRS的递归上传。据我所知,它将在上传时创建缺少的目录。

现在假设我有ftp://ftp.example.com/public_html/mydir1/mydir2/file.php这样的文件网址 是不是应该在上传之前创建mydir1和mydir2?这就是我的理解,但我的代码不起作用(执行返回CURLM_OK但没有上传文件既没有创建目录)。这是我的相关部分。如果我错了(我怀疑是这样),那么欢迎任何解决我的问题的指针。

for(int i=0; i<files.Count(); i++)
{
    //formulate right URL 
    const char* uploadUrlCstr = fileUploadPath.c_str(); //processed url just like mentioned on post

    struct stat file_info;
    FILE* fd;

    //open file and read it
    fd = fopen(files[i].c_str(), "rb"); /* open file to upload */
    if(!fd)
    {
        /* can't continue */
        SendMessage(_("Cannot Open File\n %s\nUpload Terminated!")+path);
        return ;
    }

    /* to get the file size */
    if(fstat(fileno(fd), &file_info) != 0)
    {
        /* can't continue */
        SendMessage(_("Cannot Get File size\n %s\nUpload Terminated!")+path);
        return ;
    }

    CURL* handle = curl_easy_init();
    if(handle)
    {
        SetHandleOptions(handle); //set options
        //do file upload here
        /* upload to this place */
        curl_easy_setopt(handle, CURLOPT_URL, uploadUrlCstr);
        /* tell it to "upload" to the URL */
        curl_easy_setopt(handle, CURLOPT_UPLOAD, 1L);
        /* set where to read from (on Windows you need to use READFUNCTION too) */
        curl_easy_setopt(handle, CURLOPT_READDATA, fd);
        /* and give the size of the upload (optional) */
        curl_easy_setopt(handle, CURLOPT_INFILESIZE_LARGE, (curl_off_t)file_info.st_size);
        /* enable verbose for easier tracing */
        curl_easy_setopt(handle, CURLOPT_VERBOSE, 1L);
        curl_easy_setopt(handle, CURLOPT_FTP_CREATE_MISSING_DIRS, 1L);
    }

    curl_multi_add_handle(multihandle, handle); 
    //store data
    handleGarbage.push_back(handle); //store handles
    fileObjects.push_back(fd); //store files
    timesStructs.push_back(file_info); //store sizes
}
//fire upload all files
int total ;
CURLMcode code = curl_multi_perform(multihandle, &total);//TODO 10 should come from config
if(code!=CURLM_OK)
{
    SendMessage(wxString(curl_multi_strerror(code)), HERROR_TYPE_CRITICAL);
}
//clean handles messy  

修改

我在这里添加了日志:

About to connect() to ftp.hosanna.site40.net port 21 (#33)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78036150
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#34)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78037d80
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#35)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff780399d0
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#36)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff7803b990
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#37)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff7803da70
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#38)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78133660
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#39)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78135a20
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#40)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff781382b0
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#41)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff7813ad40
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#42)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff7813da30
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#43)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78140a20
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#44)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78143c40
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#45)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78147370
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#46)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff7814abd0
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#47)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff7814e520
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#48)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff781520d0
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#49)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78155fa0
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#50)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78159fa0
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 50 (0x7fff78159fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#51)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff7815e0d0
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 50 (0x7fff78159fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 51 (0x7fff7815e0d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#52)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff78162900
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 50 (0x7fff78159fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 51 (0x7fff7815e0d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 52 (0x7fff78162900) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#53)
 [09:26:59]
  Trying 31.170.162.203...
 [09:26:59]
Adding handle: conn: 0x7fff781670f0
 [09:26:59]
Adding handle: send: 0
 [09:26:59]
Adding handle: recv: 0
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 35 (0x7fff780399d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 36 (0x7fff7803b990) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 37 (0x7fff7803da70) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 38 (0x7fff78133660) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 39 (0x7fff78135a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 40 (0x7fff781382b0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 41 (0x7fff7813ad40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 42 (0x7fff7813da30) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 43 (0x7fff78140a20) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 44 (0x7fff78143c40) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 45 (0x7fff78147370) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 46 (0x7fff7814abd0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 47 (0x7fff7814e520) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 48 (0x7fff781520d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 49 (0x7fff78155fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 50 (0x7fff78159fa0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 51 (0x7fff7815e0d0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 52 (0x7fff78162900) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 53 (0x7fff781670f0) send_pipe: 1, recv_pipe: 0
 [09:26:59]
Found bundle for host ftp.hosanna.site40.net: 0x7fff780ce800
 [09:26:59]
About to connect() to ftp.hosanna.site40.net port 21 (#54)
 [09:26:59]
Curl_addHandleToPipeline: length: 1
 [09:26:59]
- Conn 33 (0x7fff78036150) send_pipe: 1, recv_pipe: 0
 [09:26:59]
- Conn 34 (0x7fff78037d80) send_pipe: 1, recv_pipe: 0

1 个答案:

答案 0 :(得分:0)

我改变了整个设计,以便问题以某种方式失效。 我不再使用Loop了,而是去了wxWidgets wxDir类,尤其是它的遍历。