Lines Matching refs:ftpcode
226 int *ftpcode,
432 int ftpcode; in ftp_check_ctrl_on_data_wait() local
439 (void)Curl_GetFTPResponse(data, &nread, &ftpcode); in ftp_check_ctrl_on_data_wait()
485 (void)Curl_GetFTPResponse(data, &nread, &ftpcode); in ftp_check_ctrl_on_data_wait()
487 infof(data, "FTP code: %03d", ftpcode); in ftp_check_ctrl_on_data_wait()
489 if(ftpcode/100 > 3) in ftp_check_ctrl_on_data_wait()
558 int *ftpcode, /* return the ftp-code if done */ in ftp_readresp() argument
590 if(ftpcode) in ftp_readresp()
591 *ftpcode = code; in ftp_readresp()
619 int *ftpcode) /* return the ftp-code */ in Curl_GetFTPResponse() argument
639 if(ftpcode) in Curl_GetFTPResponse()
640 *ftpcode = 0; /* 0 for errors */ in Curl_GetFTPResponse()
643 ftpcode = &value_to_be_ignored; in Curl_GetFTPResponse()
647 while(!*ftpcode && !result) { in Curl_GetFTPResponse()
705 result = ftp_readresp(data, FIRSTSOCKET, pp, ftpcode, &nread); in Curl_GetFTPResponse()
724 result, *nreadp, *ftpcode); in Curl_GetFTPResponse()
1778 int ftpcode) in ftp_state_pasv_resp() argument
1794 (ftpcode == 229)) { in ftp_state_pasv_resp()
1829 (ftpcode == 227)) { in ftp_state_pasv_resp()
1875 failf(data, "Bad PASV/EPSV response: %03d", ftpcode); in ftp_state_pasv_resp()
1936 if(ftpc->count1 == 0 && ftpcode == 229) in ftp_state_pasv_resp()
1968 int ftpcode) in ftp_state_port_resp() argument
1977 if(ftpcode / 100 != 2) { in ftp_state_port_resp()
2053 int ftpcode) in ftp_state_mdtm_resp() argument
2060 switch(ftpcode) { in ftp_state_mdtm_resp()
2161 int ftpcode, in ftp_state_type_resp() argument
2167 if(ftpcode/100 != 2) { in ftp_state_type_resp()
2174 if(ftpcode != 200) in ftp_state_type_resp()
2176 ftpcode); in ftp_state_type_resp()
2275 int ftpcode, in ftp_state_size_resp() argument
2284 if(ftpcode == 213) { in ftp_state_size_resp()
2303 else if(ftpcode == 550) { /* "No such file or directory" */ in ftp_state_size_resp()
2340 int ftpcode, in ftp_state_rest_resp() argument
2350 if(ftpcode == 350) { in ftp_state_rest_resp()
2361 if(ftpcode != 350) { in ftp_state_rest_resp()
2377 int ftpcode, ftpstate instate) in ftp_state_stor_resp() argument
2382 if(ftpcode >= 400) { in ftp_state_stor_resp()
2383 failf(data, "Failed FTP upload: %0d", ftpcode); in ftp_state_stor_resp()
2414 int ftpcode, in ftp_state_get_resp() argument
2421 if((ftpcode == 150) || (ftpcode == 125)) { in ftp_state_get_resp()
2525 if((instate == FTP_LIST) && (ftpcode == 450)) { in ftp_state_get_resp()
2531 failf(data, "RETR response: %03d", ftpcode); in ftp_state_get_resp()
2532 return instate == FTP_RETR && ftpcode == 550 ? in ftp_state_get_resp()
2574 int ftpcode) in ftp_state_user_resp() argument
2581 if((ftpcode == 331) && (ftpc->state == FTP_USER)) { in ftp_state_user_resp()
2589 else if(ftpcode/100 == 2) { in ftp_state_user_resp()
2594 else if(ftpcode == 332) { in ftp_state_user_resp()
2624 failf(data, "Access denied: %03d", ftpcode); in ftp_state_user_resp()
2633 int ftpcode) in ftp_state_acct_resp() argument
2636 if(ftpcode != 230) { in ftp_state_acct_resp()
2637 failf(data, "ACCT rejected by server: %03d", ftpcode); in ftp_state_acct_resp()
2651 int ftpcode; in ftp_statemachine() local
2660 result = ftp_readresp(data, FIRSTSOCKET, pp, &ftpcode, &nread); in ftp_statemachine()
2664 if(ftpcode) { in ftp_statemachine()
2668 if(ftpcode == 230) { in ftp_statemachine()
2672 return ftp_state_user_resp(data, ftpcode); in ftp_statemachine()
2674 else if(ftpcode != 220) { in ftp_statemachine()
2676 ftpcode); in ftp_statemachine()
2741 if((ftpcode == 234) || (ftpcode == 334)) { in ftp_statemachine()
2777 result = ftp_state_user_resp(data, ftpcode); in ftp_statemachine()
2781 result = ftp_state_acct_resp(data, ftpcode); in ftp_statemachine()
2793 if(ftpcode/100 == 2) in ftp_statemachine()
2815 if(ftpcode < 500) { in ftp_statemachine()
2834 if(ftpcode == 257) { in ftp_statemachine()
2922 if(ftpcode == 215) { in ftp_statemachine()
2967 if(ftpcode == 250) { in ftp_statemachine()
2981 if((ftpcode >= 400) && !ftpc->count2) { in ftp_statemachine()
2983 failf(data, "QUOT command failed with %03d", ftpcode); in ftp_statemachine()
2991 if(ftpcode/100 != 2) { in ftp_statemachine()
3029 if((ftpcode/100 != 2) && !ftpc->count3--) { in ftp_statemachine()
3031 failf(data, "Failed to MKD dir: %03d", ftpcode); in ftp_statemachine()
3043 result = ftp_state_mdtm_resp(data, ftpcode); in ftp_statemachine()
3050 result = ftp_state_type_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
3056 result = ftp_state_size_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
3061 result = ftp_state_rest_resp(data, conn, ftpcode, ftpc->state); in ftp_statemachine()
3065 if(ftpcode != 200) { in ftp_statemachine()
3067 failf(data, "PRET command not accepted: %03d", ftpcode); in ftp_statemachine()
3074 result = ftp_state_pasv_resp(data, ftpcode); in ftp_statemachine()
3078 result = ftp_state_port_resp(data, ftpcode); in ftp_statemachine()
3083 result = ftp_state_get_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
3087 result = ftp_state_stor_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
3193 int ftpcode; in ftp_done() local
3317 result = Curl_GetFTPResponse(data, &nread, &ftpcode); in ftp_done()
3342 switch(ftpcode) { in ftp_done()
3351 failf(data, "server did not report OK, got %d", ftpcode); in ftp_done()
3426 int ftpcode = 0; in ftp_sendquote() local
3441 result = Curl_GetFTPResponse(data, &nread, &ftpcode); in ftp_sendquote()
3446 if(!acceptfail && (ftpcode >= 400)) { in ftp_sendquote()