• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/wget-1.12/src/

Lines Matching refs:con

244         wgint restval, ccon *con)
252 int cmd = con->cmd;
260 assert (con != NULL);
261 assert (con->target != NULL);
282 con->dltime = 0;
285 csock = con->csock;
288 char *host = con->proxy ? con->proxy->host : u->host;
289 int port = con->proxy ? con->proxy->port : u->port;
292 if (con->proxy)
310 con->csock = csock;
312 con->csock = -1;
321 if (con->proxy)
332 con->csock = -1;
338 con->csock = -1;
345 con->csock = -1;
351 con->csock = -1;
357 con->csock = -1;
369 err = ftp_syst (csock, &con->rs);
378 con->csock = -1;
398 err = ftp_pwd (csock, &con->id);
407 con->csock = -1;
411 xfree_null (con->id);
412 con->id = xstrdup ("/");
433 if (con->rs == ST_VMS)
435 char *path = strchr (con->id, '[');
441 char *idir = con->id;
443 DEBUGP ((" old = '%s'\n", con->id));
451 DEBUGP ((" new = '%s'\n\n", con->id));
472 con->csock = -1;
479 con->csock = -1;
487 con->csock = -1;
516 (con->id) to it. Absolute directories "just work".
543 && !(con->rs != ST_UNIX
546 && (con->rs != ST_OS400)
547 && (con->rs != ST_VMS))
549 int idlen = strlen (con->id);
552 /* Strip trailing slash(es) from con->id. */
553 while (idlen > 0 && con->id[idlen - 1] == '/')
556 memcpy (p, con->id, idlen);
563 con->id, target, ntarget));
583 if (con->rs == ST_VMS)
620 if ((con->rs == ST_VMS) && (target[0] != '/'))
647 if ((con->rs == ST_VMS) && (strchr( target, '/') != NULL))
668 targ = con->id;
702 con->csock = -1;
709 con->csock = -1;
716 con->csock = -1;
755 con->csock = -1;
784 con->csock = -1;
791 con->csock = -1;
815 con->csock = -1;
841 con->csock = -1;
850 con->csock = -1;
858 con->csock = -1;
872 con->csock = -1;
902 con->csock = -1;
911 con->csock = -1;
937 res = ftp_get_listing (u, con, &f);
942 con->cmd |= DO_RETR;
968 con->csock = -1;
994 con->csock = -1;
1003 con->csock = -1;
1032 err = ftp_list (csock, NULL, con->rs);
1041 con->csock = -1;
1050 con->csock = -1;
1106 if (!output_stream || con->cmd & DO_LIST)
1112 targ = ods_conform (con->target);
1113 if (targ != con->target)
1115 xfree (con->target);
1116 con->target = targ;
1120 mkalldirs (con->target);
1122 rotate_backups (con->target);
1139 if (restval && !(con->cmd & DO_LIST))
1147 fp = fopen (con->target, "ab", FOPEN_OPT_ARGS_BIN);
1152 fp = fopen (con->target, "a", FOPEN_OPT_ARGS);
1155 fp = fopen (con->target, "ab");
1167 fp = fopen (con->target, "wb", FOPEN_OPT_ARGS_BIN);
1172 fp = fopen (con->target, "w", FOPEN_OPT_ARGS);
1175 fp = fopen (con->target, "wb");
1180 fp = fopen_excl (con->target, true);
1188 con->target);
1190 con->csock = -1;
1198 logprintf (LOG_NOTQUIET, "%s: %s\n", con->target, strerror (errno));
1200 con->csock = -1;
1225 restval, &rd_size, qtyread, &con->dltime, flags);
1228 tmrate = retr_rate (rd_size, con->dltime);
1229 total_download_time += con->dltime;
1233 if (!output_stream || con->cmd & DO_LIST)
1240 con->target, strerror (errno));
1242 con->csock = -1;
1269 con->csock = -1;
1298 con->csock = -1;
1302 if (opt.server_response && (con->cmd & DO_LIST))
1312 targ = ods_conform( con->target);
1313 if (targ != con->target)
1315 xfree( con->target);
1316 con->target = targ;
1320 mkalldirs (con->target);
1321 fp = fopen (con->target, "r");
1323 logprintf (LOG_ALWAYS, "%s: %s\n", con->target, strerror (errno));
1340 } /* con->cmd & DO_LIST && server_response */
1348 This loop either gets commands from con, or (if ON_YOUR_OWN is
1351 ftp_loop_internal (struct url *u, struct fileinfo *f, ccon *con)
1368 if ((f == NULL) && (con->target))
1371 locf = con->target;
1376 con->target = url_file_name (u);
1378 locf = con->target;
1385 if (opt.noclobber && !opt.output_document && file_exists_p (con->target))
1388 _("File %s already there; not retrieving.\n"), quote (con->target));
1394 remove_link (con->target);
1398 if (con->st & ON_YOUR_OWN)
1399 con->st = ON_YOUR_OWN;
1401 orig_lp = con->cmd & LEAVE_PENDING ? 1 : 0;
1409 if (con->st & ON_YOUR_OWN)
1411 con->cmd = 0;
1412 con->cmd |= (DO_RETR | LEAVE_PENDING);
1413 if (con->csock != -1)
1414 con->cmd &= ~ (DO_LOGIN | DO_CWD);
1416 con->cmd |= (DO_LOGIN | DO_CWD);
1420 if (con->csock != -1)
1421 con->cmd &= ~DO_LOGIN;
1423 con->cmd |= DO_LOGIN;
1424 if (con->st & DONE_CWD)
1425 con->cmd &= ~DO_CWD;
1427 con->cmd |= DO_CWD;
1431 if (con->cmd & DO_LIST)
1467 err = getftp (u, len, &qtyread, restval, con);
1469 if (con->csock == -1)
1470 con->st &= ~DONE_CWD;
1472 con->st |= DONE_CWD;
1489 xfree_null (con->target);
1490 con->target = url_file_name (u);
1491 locf = con->target;
1512 tmrate = retr_rate (qtyread - restval, con->dltime);
1518 if (con->st & ON_YOUR_OWN)
1520 fd_close (con->csock);
1521 con->csock = -1;
1546 if ((con->cmd & DO_LIST))
1583 con->cmd |= LEAVE_PENDING;
1585 con->cmd &= ~LEAVE_PENDING;
1589 if (con->csock != -1 && (con->st & ON_YOUR_OWN))
1591 fd_close (con->csock);
1592 con->csock = -1;
1600 ftp_get_listing (struct url *u, ccon *con, struct fileinfo **f)
1605 char *old_target = con->target;
1607 con->st &= ~ON_YOUR_OWN;
1608 con->cmd |= (DO_LIST | LEAVE_PENDING);
1609 con->cmd &= ~DO_RETR;
1619 con->target = xstrdup (lf);
1621 err = ftp_loop_internal (u, NULL, con);
1622 lf = xstrdup (con->target);
1623 xfree (con->target);
1624 con->target = old_target;
1628 *f = ftp_parse_ls (lf, con->rs);
1640 con->cmd &= ~DO_LIST;
1657 ftp_retrieve_list (struct url *u, struct fileinfo *f, ccon *con)
1680 con->st &= ~ON_YOUR_OWN;
1681 if (!(con->st & DONE_CWD))
1682 con->cmd |= DO_CWD;
1684 con->cmd &= ~DO_CWD;
1685 con->cmd |= (DO_RETR | LEAVE_PENDING);
1687 if (con->csock < 0)
1688 con->cmd |= DO_LOGIN;
1690 con->cmd &= ~DO_LOGIN;
1703 old_target = con->target;
1708 con->target = url_file_name (u);
1720 if (!stat (con->target, &st))
1735 cor_val = (con->rs == ST_UNIX || con->rs == ST_WINNT);
1742 Remote file no newer than local file %s -- not retrieving.\n"), quote (con->target));
1750 quote (con->target));
1779 int rc = lstat (con->target, &st);
1786 size_t n = readlink (con->target, link_target, len);
1792 quote (con->target),
1800 quote (con->target), quote (f->linkto));
1802 unlink (con->target);
1803 if (symlink (f->linkto, con->target) == -1)
1810 quote (con->target));
1816 err = ftp_loop_internal (u, f, con);
1827 err = ftp_loop_internal (u, f, con);
1843 set_local_file (&actual_target, con->target);
1862 && file_exists_p (con->target))
1871 xfree (con->target);
1872 con->target = old_target;
1880 con->cmd &= ~ (DO_CWD | DO_LOGIN);
1887 err = ftp_retrieve_dirs (u, orig, con);
1900 ftp_retrieve_dirs (struct url *u, struct fileinfo *f, ccon *con)
1945 con->st &= ~DONE_CWD;
1950 ftp_retrieve_glob (u, con, GLOB_GETALL);
1986 ftp_retrieve_glob (struct url *u, ccon *con, int action)
1991 con->cmd |= LEAVE_PENDING;
1993 res = ftp_get_listing (u, con, &start);
2089 ftp_retrieve_list (u, start, con);
2104 con->st |= ON_YOUR_OWN;
2105 res = ftp_loop_internal (u, NULL, con);
2128 ccon con; /* FTP connection */
2133 xzero (con);
2135 con.csock = -1;
2136 con.st = ON_YOUR_OWN;
2137 con.rs = ST_UNIX;
2138 con.id = NULL;
2139 con.proxy = proxy;
2147 res = ftp_get_listing (u, &con, &f);
2155 : (con.target ? xstrdup (con.target)
2201 res = ftp_retrieve_glob (u, &con,
2205 res = ftp_loop_internal (u, NULL, &con);
2212 if (con.csock != -1)
2213 fd_close (con.csock);
2214 xfree_null (con.id);
2215 con.id = NULL;
2216 xfree_null (con.target);
2217 con.target = NULL;