Lines Matching +full:dout +full:- +full:default

4 /*-
5 * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
168 int s = -1, error; in hookup()
186 code = -1; in hookup()
190 if (res0->ai_canonname) in hookup()
191 (void)strlcpy(hostnamebuf, res0->ai_canonname, in hookup()
197 for (res = res0; res; res = res->ai_next) { in hookup()
201 if (getnameinfo(res->ai_addr, res->ai_addrlen, in hookup()
207 if (verbose && res0->ai_next) { in hookup()
211 s = socket(res->ai_family, SOCK_STREAM, res->ai_protocol); in hookup()
217 if (ftp_connect(s, res->ai_addr, res->ai_addrlen) < 0) { in hookup()
219 s = -1; in hookup()
228 code = -1; in hookup()
232 memcpy(&hisctladdr.si_su, res->ai_addr, res->ai_addrlen); in hookup()
233 hisctladdr.su_len = res->ai_addrlen; in hookup()
238 if (getsockname(s, (struct sockaddr *)&myctladdr.si_su, &len) == -1) { in hookup()
241 code = -1; in hookup()
250 (void *)&tos, sizeof(tos)) == -1) { in hookup()
264 code = -1; in hookup()
274 code = -1; in hookup()
279 (void *)&on, sizeof(on)) == -1) { in hookup()
328 fputs("---> ", ttyout); in command()
342 code = -1; in command()
405 default: in getreply()
446 ((verbose > -1 && n == '5' && dig > 4) && in getreply()
455 code = code * 10 + (c - '0'); in getreply()
464 if (pt < &pasv[sizeof(pasv) - 1]) in getreply()
473 if (dig == 4 && c == '-') { in getreply()
480 if (cp < &current_line[sizeof(current_line) - 1]) in getreply()
483 if (verbose > 0 || ((verbose > -1 && n == '5') && in getreply()
488 if (cp[-1] == '\r') in getreply()
489 cp[-1] = '\0'; in getreply()
513 return (n - '0'); in getreply()
565 default: in abortxfer()
577 * If rate_limit != 0, rate-limit the transfer.
613 bufrem -= inc; in copy_bytes()
619 inc -= outc; in copy_bytes()
636 usleep(1000000 - tvdiff.tv_usec); in copy_bytes()
650 if (inc == -1) in copy_bytes()
652 if (outc == -1) in copy_bytes()
665 FILE *volatile dout; in sendrequest() local
678 dout = NULL; in sendrequest()
680 filesize = -1; in sendrequest()
683 if (*local != '-') in sendrequest()
701 code = -1; in sendrequest()
706 if (strcmp(local, "-") == 0) { in sendrequest()
714 code = -1; in sendrequest()
723 code = -1; in sendrequest()
729 code = -1; in sendrequest()
735 code = -1; in sendrequest()
745 rc = -1; in sendrequest()
771 dout = dataconn(lmode); in sendrequest()
772 if (dout == NULL) in sendrequest()
782 progressmeter(-1); in sendrequest()
790 c = copy_bytes(fileno(fin), fileno(dout), buf, bufsize, in sendrequest()
797 bytes = -1; in sendrequest()
809 if (ferror(dout)) in sendrequest()
811 (void)putc('\r', dout); in sendrequest()
814 (void)putc(c, dout); in sendrequest()
818 (void)putc('\0', dout); in sendrequest()
830 if (ferror(dout)) { in sendrequest()
833 bytes = -1; in sendrequest()
843 (void)fclose(dout); in sendrequest()
844 dout = NULL; in sendrequest()
854 code = -1; in sendrequest()
859 data = -1; in sendrequest()
861 if (dout) { in sendrequest()
862 (void)fclose(dout); in sendrequest()
863 dout = NULL; in sendrequest()
866 code = -1; in sendrequest()
877 data = -1; in sendrequest()
881 if (dout) in sendrequest()
882 (void)fclose(dout); in sendrequest()
917 filesize = -1; in recvrequest()
922 if (ignorespecial || *local != '-') in recvrequest()
938 code = -1; in recvrequest()
943 if (ignorespecial || (strcmp(local, "-") && *local != '|')) { in recvrequest()
949 code = -1; in recvrequest()
960 code = -1; in recvrequest()
966 code = -1; in recvrequest()
971 code = -1; in recvrequest()
976 code = -1; in recvrequest()
987 if (code == 421 || code == -1) in recvrequest()
991 code = -1; in recvrequest()
1009 if (!ignorespecial && strcmp(local, "-") == 0) { in recvrequest()
1032 if (fstat(fileno(fout), &st) != -1 && !S_ISREG(st.st_mode)) { in recvrequest()
1043 progressmeter(-1); in recvrequest()
1060 bytes = -1; in recvrequest()
1120 bytes = -1; in recvrequest()
1146 if (mtime != -1) { in recvrequest()
1150 if (utimes(local, tval) == -1) { in recvrequest()
1169 code = -1; in recvrequest()
1174 code = -1; in recvrequest()
1185 data = -1; in recvrequest()
1233 (void *)&on, sizeof(on)) == -1) { in initconn()
1243 verbose = -1; in initconn()
1280 verbose = -1; in initconn()
1312 default: in initconn()
1319 data = -1; in initconn()
1339 * one-byte unsigned integer values, separated by commas. in initconn()
1443 default: in initconn()
1478 data = -1; in initconn()
1491 (void *)&on, sizeof(on)) == -1) { in initconn()
1504 if (data != -1) in initconn()
1515 (void *)&on, sizeof(on)) == -1) { in initconn()
1526 (void *)&on, sizeof(on)) == -1) { in initconn()
1531 if (getsockname(data, (struct sockaddr *)&data_addr.si_su, &len) == -1) { in initconn()
1570 verbose = -1; in initconn()
1586 default: in initconn()
1615 default: in initconn()
1622 if (result == ERROR && sendport == -1) { in initconn()
1635 (void *)&on, sizeof(on)) == -1) { in initconn()
1643 data = -1; in initconn()
1663 if ((flags = fcntl(data, F_GETFL, 0)) == -1) in dataconn()
1665 if (fcntl(data, F_SETFL, flags | O_NONBLOCK) == -1) in dataconn()
1666 goto dataconn_failed; /* set non-blocking connect */ in dataconn()
1675 /* without -q, default to 60s */ in dataconn()
1683 } while (rv == -1 && errno == EINTR); /* loop until poll ! EINTR */ in dataconn()
1684 if (rv == -1) { in dataconn()
1693 /* (non-blocking) accept the connection */ in dataconn()
1697 } while (s == -1 && errno == EINTR); /* loop until accept ! EINTR */ in dataconn()
1698 if (s == -1) { in dataconn()
1705 if (fcntl(data, F_SETFL, flags) == -1) /* restore socket flags */ in dataconn()
1712 (void *)&tos, sizeof(tos)) == -1) { in dataconn()
1721 data = -1; in dataconn()
1777 ip->connect = connected; in pswitch()
1778 connected = op->connect; in pswitch()
1780 (void)strlcpy(ip->name, hostname, sizeof(ip->name)); in pswitch()
1782 ip->name[0] = '\0'; in pswitch()
1783 hostname = op->name; in pswitch()
1784 ip->hctl = hisctladdr; in pswitch()
1785 hisctladdr = op->hctl; in pswitch()
1786 ip->mctl = myctladdr; in pswitch()
1787 myctladdr = op->mctl; in pswitch()
1788 ip->in = cin; in pswitch()
1789 cin = op->in; in pswitch()
1790 ip->out = cout; in pswitch()
1791 cout = op->out; in pswitch()
1792 ip->tpe = type; in pswitch()
1793 type = op->tpe; in pswitch()
1794 ip->curtpe = curtype; in pswitch()
1795 curtype = op->curtpe; in pswitch()
1796 ip->cpnd = cpend; in pswitch()
1797 cpend = op->cpnd; in pswitch()
1798 ip->sunqe = sunique; in pswitch()
1799 sunique = op->sunqe; in pswitch()
1800 ip->runqe = runique; in pswitch()
1801 runique = op->runqe; in pswitch()
1802 ip->mcse = mcase; in pswitch()
1803 mcase = op->mcse; in pswitch()
1804 ip->ntflg = ntflag; in pswitch()
1805 ntflag = op->ntflg; in pswitch()
1806 (void)strlcpy(ip->nti, ntin, sizeof(ip->nti)); in pswitch()
1807 (void)strlcpy(ntin, op->nti, sizeof(ntin)); in pswitch()
1808 (void)strlcpy(ip->nto, ntout, sizeof(ip->nto)); in pswitch()
1809 (void)strlcpy(ntout, op->nto, sizeof(ntout)); in pswitch()
1810 ip->mapflg = mapflag; in pswitch()
1811 mapflag = op->mapflg; in pswitch()
1812 (void)strlcpy(ip->mi, mapin, sizeof(ip->mi)); in pswitch()
1813 (void)strlcpy(mapin, op->mi, sizeof(mapin)); in pswitch()
1814 (void)strlcpy(ip->mo, mapout, sizeof(ip->mo)); in pswitch()
1815 (void)strlcpy(mapout, op->mo, sizeof(mapout)); in pswitch()
1868 code = -1; in proxtrans()
1922 code = -1; in proxtrans()
1936 code = -1; in proxtrans()
1949 code = -1; in proxtrans()
1959 code = -1; in proxtrans()
1970 code = -1; in reset()
1976 code = -1; in reset()
2018 cp--; in gunique()
2019 else if (*(cp - 2) == '.') in gunique()
2020 *(cp - 1) = '1'; in gunique()
2022 *(cp - 2) = *(cp - 2) + 1; in gunique()
2023 cp--; in gunique()
2030 * abort_squared --
2059 code = -1; in abort_remote()
2078 code = -1; in abort_remote()
2093 * Ensure that ai->ai_addr is NOT an IPv4 mapped address.
2118 if (ai->ai_family != AF_INET6) in ai_unmapped()
2120 if (ai->ai_addrlen != sizeof(struct sockaddr_in6) || in ai_unmapped()
2121 sizeof(sin) > ai->ai_addrlen) in ai_unmapped()
2123 sin6 = (struct sockaddr_in6 *)ai->ai_addr; in ai_unmapped()
2124 if (!IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr)) in ai_unmapped()
2130 memcpy(&sin.sin_addr, &sin6->sin6_addr.s6_addr[12], in ai_unmapped()
2132 sin.sin_port = sin6->sin6_port; in ai_unmapped()
2134 ai->ai_family = AF_INET; in ai_unmapped()
2138 memcpy(ai->ai_addr, &sin, len); in ai_unmapped()
2139 ai->ai_addrlen = len; in ai_unmapped()