curl-library
Re: ftp problem
Date: Thu, 18 Jul 2013 00:57:26 +0200
> From your recent log line 56:
>
> Connection accepted from server
> DEBUG: In ftp_do_more: Calling InitiateTransfer
> DEBUG: In ftp_do_more: InitiateTransfer successful
> DEBUG: in ftp_do_more: return 0 after ftp->transfer if-else
>
> These are the signs of the server having connected back to us. We should then be able to do the actual transfer. But I can't fully grasp the following log lines. In the bottom of the ftp_do_more() function, you can see a block of code that looks like:
>
> if(!ftpc->wait_data_conn) {
> /* no waiting for the data connection so this is now complete */
> *complete = TRUE;
> DEBUGF(infof(data, "DO-MORE phase ends with %d\n", (int)result));
> }
>
> That conditional block should run in this case, and *complete would be set to TRUE and that should then trickle back all the way to multi.c:1364 where dophase_done should be made TRUE and then a couple of lines below it should change multi state to CURLM_STATE_DO_DONE (from CURLM_STATE_DO_MORE).
>
This conditional block is not reached. Therefore complete is not set to true.
After InitiateTransfer succeeded, ftp_do_more returns before getting to the block you mentioned.
Just after:
...
result = ftp_multi_statemach(conn, complete);
}
// here I printed the „return .. after ftp->transfer if-else“ log message
return result;
But what happens next, should ftp_do_more be called again and now reach the aforementioned conditional block?
One other thing I can’t quite grasp is: Should ftp->transfer be > FTPTRANSFER_INFO for the conditional block to be called.? And what is the expected behavior if the transfer is completing? Does do_more get called over and over again until the server says Transfer complete?
Sorry for potentially stupid questions, I am a little confused at the moment.
Where would you place additional log statements?
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-18