Lines Matching defs:ftp

52 #include "ftp.h"
441 DEBUGF(infof(data, "ftp InitiateTransfer()"));
524 DEBUGF(infof(data, "ftp AllowServerConnect() -> %d", result));
528 /* macro to check for a three-digit ftp status code at the start of the
553 int *ftpcode, /* return the ftp-code if done */
576 /* normal ftp stuff we pass through! */
614 int *ftpcode) /* return the ftp-code */
875 for all upcoming ones in the ftp->dirs[] array */
1321 struct FTP *ftp = data->req.p.ftp;
1324 if(ftp->transfer != PPTRANSFER_BODY) {
1365 struct FTP *ftp = data->req.p.ftp;
1368 if((ftp->transfer != PPTRANSFER_BODY) && ftpc->file) {
1387 struct FTP *ftp = data->req.p.ftp;
1390 if((ftp->transfer == PPTRANSFER_INFO) && ftpc->file) {
1407 struct FTP *ftp = data->req.p.ftp;
1426 if((data->set.ftp_filemethod == FTPFILE_NOCWD) && ftp->path) {
1430 result = Curl_urldecode(ftp->path, 0, &rawPath, NULL, REJECT_CTRL);
1484 struct FTP *ftp = data->req.p.ftp;
1497 ftp->transfer = PPTRANSFER_INFO;
1543 struct FTP *ftp = data->req.p.ftp;
1555 don't another ftp command. We just skip the source file
1621 ftp->transfer = PPTRANSFER_NONE;
1643 struct FTP *ftp = data->req.p.ftp;
1707 if(ftp->transfer != PPTRANSFER_BODY)
1790 not the ftp host. */
1949 /* normal, direct, ftp connection */
2100 struct FTP *ftp = data->req.p.ftp;
2175 ftp->transfer = PPTRANSFER_NONE; /* mark to not transfer data */
2184 ftp->transfer = PPTRANSFER_NONE; /* mark to not transfer data */
2237 struct FTP *ftp = data->req.p.ftp;
2246 ftp->downloadsize = filesize;
2252 infof(data, "ftp server doesn't support SIZE");
2270 ftp->downloadsize = -data->state.resume_from;
2272 data->state.resume_from = filesize - ftp->downloadsize;
2282 ftp->downloadsize = filesize-data->state.resume_from;
2286 if(ftp->downloadsize == 0) {
2293 ftp->transfer = PPTRANSFER_NONE;
2461 struct FTP *ftp = data->req.p.ftp;
2498 (ftp->downloadsize < 1)) {
2532 else if(ftp->downloadsize > -1)
2533 size = ftp->downloadsize;
2571 ftp->transfer = PPTRANSFER_NONE; /* don't download anything */
2594 The 'draft-murray-auth-ftp-ssl' (draft 12, page 7) says:
2720 failf(data, "Got a %03d ftp-server response when 220 was expected",
3191 /* We always support persistent connections on ftp */
3228 struct FTP *ftp = data->req.p.ftp;
3237 if(!ftp)
3283 result = Curl_urldecode(ftp->path, 0, &rawPath, &pathLen,
3342 if(!result && (ftp->transfer == PPTRANSFER_BODY) && ftpc->ctl_valid &&
3366 Curl_safefree(ftp->pathalloc);
3404 (ftp->transfer == PPTRANSFER_BODY)) {
3436 ftp->transfer = PPTRANSFER_BODY;
3442 Curl_safefree(ftp->pathalloc);
3587 /* the ftp struct is inited in ftp_connect(). If we are connecting to an HTTP
3590 struct FTP *ftp = NULL;
3611 ftp = data->req.p.ftp;
3631 if(ftp->transfer <= PPTRANSFER_INFO) {
3667 ftp->downloadsize = -1; /* unknown as of yet */
3684 if(ftp->transfer == PPTRANSFER_BODY) {
3738 struct FTP *ftp = data->req.p.ftp;
3739 ftp->transfer = PPTRANSFER_INFO;
3773 struct FTP *ftp = data->req.p.ftp;
3774 char *path = ftp->path;
3779 last_slash = strrchr(ftp->path, '/');
3809 /* allocate ftp protocol specific wildcard data */
3830 /* try to parse ftp url */
3836 wildcard->path = strdup(ftp->path);
3908 struct FTP *ftp = data->req.p.ftp;
3914 /* switch default ftp->path and tmp_path */
3915 free(ftp->pathalloc);
3916 ftp->pathalloc = ftp->path = tmp_path;
4038 * This should be called before calling sclose() on an ftp control connection
4085 ftp_quit() will check the state of ftp->ctl_valid. If it's ok it
4126 /* the ftp struct is already inited in ftp_connect() */
4127 struct FTP *ftp = data->req.p.ftp;
4139 /* url-decode ftp path before further evaluation */
4140 result = Curl_urldecode(ftp->path, 0, &rawPath, &pathLen, REJECT_CTRL);
4239 if(data->state.upload && !ftpc->file && (ftp->transfer == PPTRANSFER_BODY)) {
4274 struct FTP *ftp = data->req.p.ftp;
4287 if(ftp->transfer != PPTRANSFER_BODY)
4324 * ftp->ctl_valid starts out as FALSE, and gets set to TRUE if we reach the
4369 struct FTP *ftp;
4373 ftp = calloc(1, sizeof(struct FTP));
4374 if(!ftp)
4381 free(ftp);
4390 free(ftp);
4394 data->req.p.ftp = ftp;
4396 ftp->path = &data->state.up.path[1]; /* don't include the initial slash */
4400 type = strstr(ftp->path, ";type=");
4427 /* get some initial data into the ftp struct */
4428 ftp->transfer = PPTRANSFER_BODY;
4429 ftp->downloadsize = 0;