if(result || !connected)
return result;
- if(ftpc->state_saved == FTP_STOR) {
+ if(data->state.upload) {
/* When we know we are uploading a specified file, we can get the file
size prior to the actual upload. */
Curl_pgrsSetUploadSize(data, data->state.infilesize);
static CURLcode ftp_state_stor_resp(struct Curl_easy *data,
struct ftp_conn *ftpc,
- int ftpcode, ftpstate instate)
+ int ftpcode)
{
CURLcode result = CURLE_OK;
return CURLE_UPLOAD_FAILED;
}
- ftpc->state_saved = instate;
-
/* PORT means we are now awaiting the server to connect to us. */
if(data->set.ftp_use_port) {
bool connected;
infof(data, "Getting file with size: %" FMT_OFF_T, size);
/* FTP download: */
- ftpc->state_saved = instate;
ftpc->retr_size_saved = size;
if(data->set.ftp_use_port) {
break;
case FTP_STOR:
- result = ftp_state_stor_resp(data, ftpc, ftpcode, ftpc->state);
+ result = ftp_state_stor_resp(data, ftpc, ftpcode);
break;
case FTP_QUIT:
< FTP_MAX_DIR_DEPTH */
unsigned char state; /* (ftpstate enum) always use ftp.c:state() to change
state! */
- unsigned char state_saved; /* (ftpstate enum) transfer type saved to be
- reloaded after data connection is
- established */
unsigned char use_ssl; /* if AUTH TLS is to be attempted etc, for FTP or
IMAP or POP3 or others! (type: curl_usessl)*/
unsigned char ccc; /* ccc level for this connection */