Deleted Added
full compact
ftp.c (99253) ftp.c (103459)
1/*-
2 * Copyright (c) 1998 Dag-Erling Co�dan Sm�rgrav
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1998 Dag-Erling Co�dan Sm�rgrav
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 13 unchanged lines hidden (view full) ---

22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/lib/libfetch/ftp.c 99253 2002-07-02 11:09:02Z ume $");
30__FBSDID("$FreeBSD: head/lib/libfetch/ftp.c 103459 2002-09-17 05:54:33Z fenner $");
31
32/*
33 * Portions of this code were taken from or based on ftpio.c:
34 *
35 * ----------------------------------------------------------------------------
36 * "THE BEER-WARE LICENSE" (Revision 42):
37 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
38 * can do whatever you want with this stuff. If we meet some day, and you think

--- 752 unchanged lines hidden (view full) ---

791 conn = _fetch_connect(purl->host, purl->port, af, verbose);
792 } else {
793 /* no proxy, go straight to target */
794 conn = _fetch_connect(url->host, url->port, af, verbose);
795 purl = NULL;
796 }
797
798 /* check connection */
31
32/*
33 * Portions of this code were taken from or based on ftpio.c:
34 *
35 * ----------------------------------------------------------------------------
36 * "THE BEER-WARE LICENSE" (Revision 42):
37 * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you
38 * can do whatever you want with this stuff. If we meet some day, and you think

--- 752 unchanged lines hidden (view full) ---

791 conn = _fetch_connect(purl->host, purl->port, af, verbose);
792 } else {
793 /* no proxy, go straight to target */
794 conn = _fetch_connect(url->host, url->port, af, verbose);
795 purl = NULL;
796 }
797
798 /* check connection */
799 if (conn == NULL) {
800 _fetch_syserr();
799 if (conn == NULL)
800 /* _fetch_connect() has already set an error code */
801 return (NULL);
801 return (NULL);
802 }
803
804 /* expect welcome message */
805 if ((e = _ftp_chkerr(conn)) != FTP_SERVICE_READY)
806 goto fouch;
807
808 /* authenticate */
809 if ((e = _ftp_authenticate(conn, url, purl)) != FTP_LOGGED_IN)
810 goto fouch;

--- 201 unchanged lines hidden ---
802
803 /* expect welcome message */
804 if ((e = _ftp_chkerr(conn)) != FTP_SERVICE_READY)
805 goto fouch;
806
807 /* authenticate */
808 if ((e = _ftp_authenticate(conn, url, purl)) != FTP_LOGGED_IN)
809 goto fouch;

--- 201 unchanged lines hidden ---