Deleted Added
full compact
ftp.c (174761) ftp.c (175611)
1/*-
2 * Copyright (c) 1998-2004 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-2004 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 174761 2007-12-19 00:26:36Z des $");
30__FBSDID("$FreeBSD: head/lib/libfetch/ftp.c 175611 2008-01-23 20:57:59Z des $");
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

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

1176int
1177fetchStatFTP(struct url *url, struct url_stat *us, const char *flags)
1178{
1179 FILE *f;
1180
1181 f = ftp_request(url, "STAT", us, ftp_get_proxy(url, flags), flags);
1182 if (f == NULL)
1183 return (-1);
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

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

1176int
1177fetchStatFTP(struct url *url, struct url_stat *us, const char *flags)
1178{
1179 FILE *f;
1180
1181 f = ftp_request(url, "STAT", us, ftp_get_proxy(url, flags), flags);
1182 if (f == NULL)
1183 return (-1);
1184 fclose(f);
1184 /*
1185 * When op is "STAT", ftp_request() will return either NULL or
1186 * (FILE *)1, never a valid FILE *, so we mustn't fclose(f) before
1187 * returning, as it would cause a segfault.
1188 */
1185 return (0);
1186}
1187
1188/*
1189 * List a directory
1190 */
1191struct url_ent *
1192fetchListFTP(struct url *url __unused, const char *flags __unused)
1193{
1194 warnx("fetchListFTP(): not implemented");
1195 return (NULL);
1196}
1189 return (0);
1190}
1191
1192/*
1193 * List a directory
1194 */
1195struct url_ent *
1196fetchListFTP(struct url *url __unused, const char *flags __unused)
1197{
1198 warnx("fetchListFTP(): not implemented");
1199 return (NULL);
1200}