• Home
  • Raw
  • Download

Lines Matching refs:ftpc

243 static void freedirs(struct ftp_conn *ftpc)  in freedirs()  argument
245 if(ftpc->dirs) { in freedirs()
247 for(i = 0; i < ftpc->dirdepth; i++) { in freedirs()
248 free(ftpc->dirs[i]); in freedirs()
249 ftpc->dirs[i] = NULL; in freedirs()
251 free(ftpc->dirs); in freedirs()
252 ftpc->dirs = NULL; in freedirs()
253 ftpc->dirdepth = 0; in freedirs()
255 Curl_safefree(ftpc->file); in freedirs()
258 Curl_safefree(ftpc->newhost); in freedirs()
373 struct ftp_conn *ftpc = &conn->proto.ftpc; in ReceivedServerConnect() local
374 struct pingpong *pp = &ftpc->pp; in ReceivedServerConnect()
453 if(conn->proto.ftpc.state_saved == FTP_STOR) { in InitiateTransfer()
466 conn->proto.ftpc.retr_size_saved, FALSE, -1); in InitiateTransfer()
469 conn->proto.ftpc.pp.pending_resp = TRUE; /* expect server response */ in InitiateTransfer()
625 struct ftp_conn *ftpc = &conn->proto.ftpc; in Curl_GetFTPResponse() local
626 struct pingpong *pp = &ftpc->pp; in Curl_GetFTPResponse()
763 struct ftp_conn *ftpc = &conn->proto.ftpc; in _state() local
770 if(ftpc->state != newstate) in _state()
772 (void *)ftpc, lineno, ftp_state_names[ftpc->state], in _state()
777 ftpc->state = newstate; in _state()
784 &conn->proto.ftpc.pp, "USER %s", in ftp_state_user()
796 CURLcode result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", "PWD"); in ftp_state_pwd()
808 return Curl_pp_getsock(data, &conn->proto.ftpc.pp, socks); in ftp_getsock()
815 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_domore_getsock() local
826 if(FTP_STOP == ftpc->state) { in ftp_domore_getsock()
854 return Curl_pp_getsock(data, &conn->proto.ftpc.pp, socks); in ftp_domore_getsock()
867 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_cwd() local
869 if(ftpc->cwddone) in ftp_state_cwd()
875 !(ftpc->dirdepth && ftpc->dirs[0][0] == '/')); in ftp_state_cwd()
877 ftpc->count2 = 0; /* count2 counts failed CWDs */ in ftp_state_cwd()
882 ftpc->count3 = (data->set.ftp_create_missing_dirs == 2)?1:0; in ftp_state_cwd()
884 if(conn->bits.reuse && ftpc->entrypath && in ftp_state_cwd()
886 !(ftpc->dirdepth && ftpc->dirs[0][0] == '/')) { in ftp_state_cwd()
890 ftpc->cwdcount = 0; /* we count this as the first path, then we add one in ftp_state_cwd()
892 result = Curl_pp_sendf(data, &ftpc->pp, "CWD %s", ftpc->entrypath); in ftp_state_cwd()
897 if(ftpc->dirdepth) { in ftp_state_cwd()
898 ftpc->cwdcount = 1; in ftp_state_cwd()
901 result = Curl_pp_sendf(data, &ftpc->pp, "CWD %s", in ftp_state_cwd()
902 ftpc->dirs[ftpc->cwdcount -1]); in ftp_state_cwd()
926 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_use_port() local
1240 result = Curl_pp_sendf(data, &ftpc->pp, "%s |%d|%s|%hu|", mode[fcmd], in ftp_state_use_port()
1248 ftpc->count1 = PORT; in ftp_state_use_port()
1273 result = Curl_pp_sendf(data, &ftpc->pp, "%s %s", mode[fcmd], target); in ftp_state_use_port()
1287 ftpc->count1 = fcmd; in ftp_state_use_port()
1312 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_use_pasv() local
1340 result = Curl_pp_sendf(data, &ftpc->pp, "%s", mode[modeoff]); in ftp_state_use_pasv()
1342 ftpc->count1 = modeoff; in ftp_state_use_pasv()
1378 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_prepare_transfer() local
1379 if(!conn->proto.ftpc.file) in ftp_state_prepare_transfer()
1380 result = Curl_pp_sendf(data, &ftpc->pp, "PRET %s", in ftp_state_prepare_transfer()
1385 result = Curl_pp_sendf(data, &ftpc->pp, "PRET STOR %s", in ftp_state_prepare_transfer()
1386 conn->proto.ftpc.file); in ftp_state_prepare_transfer()
1388 result = Curl_pp_sendf(data, &ftpc->pp, "PRET RETR %s", in ftp_state_prepare_transfer()
1389 conn->proto.ftpc.file); in ftp_state_prepare_transfer()
1404 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_rest() local
1406 if((ftp->transfer != PPTRANSFER_BODY) && ftpc->file) { in ftp_state_rest()
1411 result = Curl_pp_sendf(data, &ftpc->pp, "REST %d", 0); in ftp_state_rest()
1426 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_size() local
1428 if((ftp->transfer == PPTRANSFER_INFO) && ftpc->file) { in ftp_state_size()
1432 result = Curl_pp_sendf(data, &ftpc->pp, "SIZE %s", ftpc->file); in ftp_state_size()
1498 result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", cmd); in ftp_state_list()
1524 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_type() local
1529 if(data->set.opt_no_body && ftpc->file && in ftp_state_type()
1556 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_mdtm() local
1559 if((data->set.get_filetime || data->set.timecondition) && ftpc->file) { in ftp_state_mdtm()
1563 result = Curl_pp_sendf(data, &ftpc->pp, "MDTM %s", ftpc->file); in ftp_state_mdtm()
1582 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_ul_setup() local
1603 result = Curl_pp_sendf(data, &ftpc->pp, "SIZE %s", ftpc->file); in ftp_state_ul_setup()
1667 result = Curl_pp_sendf(data, &ftpc->pp, append?"APPE %s":"STOR %s", in ftp_state_ul_setup()
1668 ftpc->file); in ftp_state_ul_setup()
1682 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_quote() local
1707 ftpc->count1 = 0; in ftp_state_quote()
1709 ftpc->count1++; in ftp_state_quote()
1715 while((i< ftpc->count1) && item) { in ftp_state_quote()
1723 ftpc->count2 = 1; /* the sent command is allowed to fail */ in ftp_state_quote()
1726 ftpc->count2 = 0; /* failure means cancel operation */ in ftp_state_quote()
1728 result = Curl_pp_sendf(data, &ftpc->pp, "%s", cmd); in ftp_state_quote()
1747 if(ftpc->known_filesize != -1) { in ftp_state_quote()
1748 Curl_pgrsSetDownloadSize(data, ftpc->known_filesize); in ftp_state_quote()
1749 result = ftp_state_retr(data, ftpc->known_filesize); in ftp_state_quote()
1765 result = Curl_pp_sendf(data, &ftpc->pp, "RETR %s", ftpc->file); in ftp_state_quote()
1770 result = Curl_pp_sendf(data, &ftpc->pp, "SIZE %s", ftpc->file); in ftp_state_quote()
1810 result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", "PASV"); in ftp_epsv_disable()
1812 conn->proto.ftpc.count1++; in ftp_epsv_disable()
1837 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_pasv_resp() local
1845 Curl_safefree(ftpc->newhost); in ftp_state_pasv_resp()
1847 if((ftpc->count1 == 0) && in ftp_state_pasv_resp()
1877 ftpc->newport = (unsigned short)(num & 0xffff); in ftp_state_pasv_resp()
1878 ftpc->newhost = strdup(control_address(conn)); in ftp_state_pasv_resp()
1879 if(!ftpc->newhost) in ftp_state_pasv_resp()
1891 else if((ftpc->count1 == 1) && in ftp_state_pasv_resp()
1927 ftpc->newhost = strdup(control_address(conn)); in ftp_state_pasv_resp()
1930 ftpc->newhost = aprintf("%u.%u.%u.%u", ip[0], ip[1], ip[2], ip[3]); in ftp_state_pasv_resp()
1932 if(!ftpc->newhost) in ftp_state_pasv_resp()
1935 ftpc->newport = (unsigned short)(((port[0]<<8) + port[1]) & 0xffff); in ftp_state_pasv_resp()
1937 else if(ftpc->count1 == 0) { in ftp_state_pasv_resp()
1973 DEBUGASSERT(ftpc->newhost); in ftp_state_pasv_resp()
1976 if(conn->bits.tcp_fastopen && !conn->bits.reuse && !ftpc->newhost[0]) { in ftp_state_pasv_resp()
1978 Curl_safefree(ftpc->newhost); in ftp_state_pasv_resp()
1979 ftpc->newhost = strdup(control_address(conn)); in ftp_state_pasv_resp()
1980 if(!ftpc->newhost) in ftp_state_pasv_resp()
1984 rc = Curl_resolv(data, ftpc->newhost, ftpc->newport, FALSE, &addr); in ftp_state_pasv_resp()
1989 connectport = ftpc->newport; /* we connect to the remote port */ in ftp_state_pasv_resp()
1992 failf(data, "Can't resolve new host %s:%hu", ftpc->newhost, connectport); in ftp_state_pasv_resp()
2002 if(ftpc->count1 == 0 && ftpcode == 229) in ftp_state_pasv_resp()
2017 ftp_pasv_verbose(data, addr->addr, ftpc->newhost, connectport); in ftp_state_pasv_resp()
2022 conn->secondary_port = ftpc->newport; in ftp_state_pasv_resp()
2023 conn->secondaryhostname = strdup(ftpc->newhost); in ftp_state_pasv_resp()
2037 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_port_resp() local
2038 ftpport fcmd = (ftpport)ftpc->count1; in ftp_state_port_resp()
2075 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_mdtm_resp() local
2099 ftpc->file && in ftp_state_mdtm_resp()
2210 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_retr() local
2272 result = Curl_pp_sendf(data, &ftpc->pp, "REST %" CURL_FORMAT_CURL_OFF_T, in ftp_state_retr()
2279 result = Curl_pp_sendf(data, &ftpc->pp, "RETR %s", ftpc->file); in ftp_state_retr()
2356 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_rest_resp() local
2379 result = Curl_pp_sendf(data, &ftpc->pp, "RETR %s", ftpc->file); in ftp_state_rest_resp()
2402 conn->proto.ftpc.state_saved = instate; in ftp_state_stor_resp()
2415 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_stor_resp() local
2417 ftpc->wait_data_conn = TRUE; in ftp_state_stor_resp()
2517 conn->proto.ftpc.state_saved = instate; in ftp_state_get_resp()
2518 conn->proto.ftpc.retr_size_saved = size; in ftp_state_get_resp()
2528 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_get_resp() local
2531 ftpc->wait_data_conn = TRUE; in ftp_state_get_resp()
2575 result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "PBSZ %d", 0); in ftp_state_loggedin()
2592 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_state_user_resp() local
2596 if((ftpcode == 331) && (ftpc->state == FTP_USER)) { in ftp_state_user_resp()
2599 result = Curl_pp_sendf(data, &ftpc->pp, "PASS %s", in ftp_state_user_resp()
2611 result = Curl_pp_sendf(data, &ftpc->pp, "ACCT %s", in ftp_state_user_resp()
2631 Curl_pp_sendf(data, &ftpc->pp, "%s", in ftp_state_user_resp()
2668 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_statemachine() local
2669 struct pingpong *pp = &ftpc->pp; in ftp_statemachine()
2682 switch(ftpc->state) { in ftp_statemachine()
2688 return ftp_state_user_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
2718 ftpc->count3 = 0; in ftp_statemachine()
2722 ftpc->count2 = 1; /* add one to get next */ in ftp_statemachine()
2723 ftpc->count1 = 0; in ftp_statemachine()
2726 ftpc->count2 = -1; /* subtract one to get next */ in ftp_statemachine()
2727 ftpc->count1 = 1; in ftp_statemachine()
2734 result = Curl_pp_sendf(data, &ftpc->pp, "AUTH %s", in ftp_statemachine()
2735 ftpauth[ftpc->count1]); in ftp_statemachine()
2765 else if(ftpc->count3 < 1) { in ftp_statemachine()
2766 ftpc->count3++; in ftp_statemachine()
2767 ftpc->count1 += ftpc->count2; /* get next attempt */ in ftp_statemachine()
2768 result = Curl_pp_sendf(data, &ftpc->pp, "AUTH %s", in ftp_statemachine()
2769 ftpauth[ftpc->count1]); in ftp_statemachine()
2784 result = ftp_state_user_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
2793 Curl_pp_sendf(data, &ftpc->pp, "PROT %c", in ftp_statemachine()
2813 result = Curl_pp_sendf(data, &ftpc->pp, "%s", "CCC"); in ftp_statemachine()
2896 if(!ftpc->server_os && dir[0] != '/') { in ftp_statemachine()
2897 result = Curl_pp_sendf(data, &ftpc->pp, "%s", "SYST"); in ftp_statemachine()
2902 Curl_safefree(ftpc->entrypath); in ftp_statemachine()
2903 ftpc->entrypath = dir; /* remember this */ in ftp_statemachine()
2904 infof(data, "Entry path is '%s'", ftpc->entrypath); in ftp_statemachine()
2906 data->state.most_recent_ftp_entrypath = ftpc->entrypath; in ftp_statemachine()
2911 Curl_safefree(ftpc->entrypath); in ftp_statemachine()
2912 ftpc->entrypath = dir; /* remember this */ in ftp_statemachine()
2913 infof(data, "Entry path is '%s'", ftpc->entrypath); in ftp_statemachine()
2915 data->state.most_recent_ftp_entrypath = ftpc->entrypath; in ftp_statemachine()
2950 result = Curl_pp_sendf(data, &ftpc->pp, "%s", "SITE NAMEFMT 1"); in ftp_statemachine()
2956 Curl_safefree(ftpc->server_os); in ftp_statemachine()
2957 ftpc->server_os = os; in ftp_statemachine()
2963 Curl_safefree(ftpc->server_os); in ftp_statemachine()
2964 ftpc->server_os = os; in ftp_statemachine()
2989 if((ftpcode >= 400) && !ftpc->count2) { in ftp_statemachine()
2995 result = ftp_state_quote(data, FALSE, ftpc->state); in ftp_statemachine()
3002 ftpc->cwdcount && !ftpc->count2) { in ftp_statemachine()
3004 ftpc->count2++; /* counter to prevent CWD-MKD loops */ in ftp_statemachine()
3005 result = Curl_pp_sendf(data, &ftpc->pp, "MKD %s", in ftp_statemachine()
3006 ftpc->dirs[ftpc->cwdcount - 1]); in ftp_statemachine()
3013 ftpc->cwdfail = TRUE; /* don't remember this path as we failed in ftp_statemachine()
3020 ftpc->count2 = 0; in ftp_statemachine()
3021 if(++ftpc->cwdcount <= ftpc->dirdepth) in ftp_statemachine()
3023 result = Curl_pp_sendf(data, &ftpc->pp, "CWD %s", in ftp_statemachine()
3024 ftpc->dirs[ftpc->cwdcount - 1]); in ftp_statemachine()
3031 if((ftpcode/100 != 2) && !ftpc->count3--) { in ftp_statemachine()
3039 result = Curl_pp_sendf(data, &ftpc->pp, "CWD %s", in ftp_statemachine()
3040 ftpc->dirs[ftpc->cwdcount - 1]); in ftp_statemachine()
3052 result = ftp_state_type_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
3058 result = ftp_state_size_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
3063 result = ftp_state_rest_resp(data, conn, ftpcode, ftpc->state); in ftp_statemachine()
3085 result = ftp_state_get_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
3089 result = ftp_state_stor_resp(data, ftpcode, ftpc->state); in ftp_statemachine()
3110 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_multi_statemach() local
3111 CURLcode result = Curl_pp_statemach(data, &ftpc->pp, FALSE, FALSE); in ftp_multi_statemach()
3116 *done = (ftpc->state == FTP_STOP) ? TRUE : FALSE; in ftp_multi_statemach()
3124 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_block_statemach() local
3125 struct pingpong *pp = &ftpc->pp; in ftp_block_statemach()
3128 while(ftpc->state != FTP_STOP) { in ftp_block_statemach()
3150 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_connect() local
3151 struct pingpong *pp = &ftpc->pp; in ftp_connect()
3194 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_done() local
3195 struct pingpong *pp = &ftpc->pp; in ftp_done()
3230 ftpc->ctl_valid = FALSE; in ftp_done()
3231 ftpc->cwdfail = TRUE; /* set this TRUE to prevent us to remember the in ftp_done()
3239 if(data->set.chunk_end && ftpc->file) { in ftp_done()
3244 ftpc->known_filesize = -1; in ftp_done()
3254 ftpc->ctl_valid = FALSE; /* mark control connection as bad */ in ftp_done()
3256 free(ftpc->prevpath); in ftp_done()
3257 ftpc->prevpath = NULL; /* no path remembering */ in ftp_done()
3263 free(ftpc->prevpath); in ftp_done()
3265 if(!ftpc->cwdfail) { in ftp_done()
3269 pathLen -= ftpc->file?strlen(ftpc->file):0; /* file is url-decoded */ in ftp_done()
3272 ftpc->prevpath = rawPath; in ftp_done()
3276 ftpc->prevpath = NULL; /* no path */ in ftp_done()
3280 if(ftpc->prevpath) in ftp_done()
3281 infof(data, "Remembering we are in dir \"%s\"", ftpc->prevpath); in ftp_done()
3285 freedirs(ftpc); in ftp_done()
3294 if(!result && ftpc->dont_check && data->req.maxdownload > 0) { in ftp_done()
3300 ftpc->ctl_valid = FALSE; /* mark control connection as bad */ in ftp_done()
3316 if(!result && (ftp->transfer == PPTRANSFER_BODY) && ftpc->ctl_valid && in ftp_done()
3335 ftpc->ctl_valid = FALSE; /* mark control connection as bad */ in ftp_done()
3344 if(ftpc->dont_check && data->req.maxdownload > 0) { in ftp_done()
3352 if(!ftpc->dont_check) { in ftp_done()
3401 else if(!ftpc->dont_check && in ftp_done()
3411 ftpc->dont_check = FALSE; in ftp_done()
3435 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_sendquote() local
3436 struct pingpong *pp = &ftpc->pp; in ftp_sendquote()
3457 result = Curl_pp_sendf(data, &ftpc->pp, "%s", cmd); in ftp_sendquote()
3486 return conn->proto.ftpc.transfertype != (ascii_wanted?'A':'I'); in ftp_need_type()
3501 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_nb_type() local
3505 if(ftpc->transfertype == want) { in ftp_nb_type()
3510 result = Curl_pp_sendf(data, &ftpc->pp, "TYPE %c", want); in ftp_nb_type()
3515 ftpc->transfertype = want; in ftp_nb_type()
3556 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_do_more() local
3581 if(result && (ftpc->count1 == 0)) { in ftp_do_more()
3603 if(ftpc->state) { in ftp_do_more()
3612 if(result || !ftpc->wait_data_conn) in ftp_do_more()
3625 if(ftpc->wait_data_conn == TRUE) { in ftp_do_more()
3635 ftpc->wait_data_conn = FALSE; in ftp_do_more()
3653 if(ftpc->wait_data_conn) in ftp_do_more()
3669 ftpc->dont_check = TRUE; in ftp_do_more()
3674 else if(data->state.list_only || !ftpc->file) { in ftp_do_more()
3703 if(!ftpc->wait_data_conn) { in ftp_do_more()
3903 struct ftp_conn *ftpc = &conn->proto.ftpc; in wc_statemach() local
3939 ftpc->known_filesize = finfo->size; in wc_statemach()
4003 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_do() local
4006 ftpc->wait_data_conn = FALSE; /* default to no such wait */ in ftp_do()
4043 if(conn->proto.ftpc.ctl_valid) { in ftp_quit()
4044 result = Curl_pp_sendf(data, &conn->proto.ftpc.pp, "%s", "QUIT"); in ftp_quit()
4048 conn->proto.ftpc.ctl_valid = FALSE; /* mark control connection as bad */ in ftp_quit()
4073 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_disconnect() local
4074 struct pingpong *pp = &ftpc->pp; in ftp_disconnect()
4084 ftpc->ctl_valid = FALSE; in ftp_disconnect()
4089 if(ftpc->entrypath) { in ftp_disconnect()
4090 if(data->state.most_recent_ftp_entrypath == ftpc->entrypath) { in ftp_disconnect()
4093 Curl_safefree(ftpc->entrypath); in ftp_disconnect()
4096 freedirs(ftpc); in ftp_disconnect()
4097 Curl_safefree(ftpc->account); in ftp_disconnect()
4098 Curl_safefree(ftpc->alternative_to_user); in ftp_disconnect()
4099 Curl_safefree(ftpc->prevpath); in ftp_disconnect()
4100 Curl_safefree(ftpc->server_os); in ftp_disconnect()
4119 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_parse_url_path() local
4126 ftpc->ctl_valid = FALSE; in ftp_parse_url_path()
4127 ftpc->cwdfail = FALSE; in ftp_parse_url_path()
4155 ftpc->dirs = calloc(1, sizeof(ftpc->dirs[0])); in ftp_parse_url_path()
4156 if(!ftpc->dirs) { in ftp_parse_url_path()
4161 ftpc->dirs[0] = calloc(1, dirlen + 1); in ftp_parse_url_path()
4162 if(!ftpc->dirs[0]) { in ftp_parse_url_path()
4167 strncpy(ftpc->dirs[0], rawPath, dirlen); in ftp_parse_url_path()
4168 ftpc->dirdepth = 1; /* we consider it to be a single dir */ in ftp_parse_url_path()
4187 ftpc->dirs = calloc(dirAlloc, sizeof(ftpc->dirs[0])); in ftp_parse_url_path()
4188 if(!ftpc->dirs) { in ftp_parse_url_path()
4198 if((compLen == 0) && (ftpc->dirdepth == 0)) in ftp_parse_url_path()
4211 ftpc->dirs[ftpc->dirdepth++] = comp; in ftp_parse_url_path()
4216 DEBUGASSERT(ftpc->dirdepth <= dirAlloc); in ftp_parse_url_path()
4223 ftpc->file = strdup(fileName); in ftp_parse_url_path()
4225 ftpc->file = NULL; /* instead of point to a zero byte, in ftp_parse_url_path()
4228 if(data->state.upload && !ftpc->file && (ftp->transfer == PPTRANSFER_BODY)) { in ftp_parse_url_path()
4235 ftpc->cwddone = FALSE; /* default to not done */ in ftp_parse_url_path()
4238 ftpc->cwddone = TRUE; /* skip CWD for absolute paths */ in ftp_parse_url_path()
4240 const char *oldPath = conn->bits.reuse ? ftpc->prevpath : ""; in ftp_parse_url_path()
4246 n -= ftpc->file?strlen(ftpc->file):0; in ftp_parse_url_path()
4250 ftpc->cwddone = TRUE; in ftp_parse_url_path()
4264 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_dophase_done() local
4283 ftpc->ctl_valid = TRUE; /* seems good */ in ftp_dophase_done()
4323 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_regular_transfer() local
4331 ftpc->ctl_valid = TRUE; /* starts good */ in ftp_regular_transfer()
4349 freedirs(ftpc); in ftp_regular_transfer()
4359 struct ftp_conn *ftpc = &conn->proto.ftpc; in ftp_setup_connection() local
4367 ftpc->account = strdup(data->set.str[STRING_FTP_ACCOUNT]); in ftp_setup_connection()
4368 if(!ftpc->account) { in ftp_setup_connection()
4374 ftpc->alternative_to_user = in ftp_setup_connection()
4376 if(!ftpc->alternative_to_user) { in ftp_setup_connection()
4377 Curl_safefree(ftpc->account); in ftp_setup_connection()
4418 ftpc->known_filesize = -1; /* unknown size for now */ in ftp_setup_connection()
4419 ftpc->use_ssl = data->set.use_ssl; in ftp_setup_connection()
4420 ftpc->ccc = data->set.ftp_ccc; in ftp_setup_connection()