1/*
2 * Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994
3 * The Regents of the University of California. 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
--- 30 unchanged lines hidden (view full) ---
39#endif /* not lint */
40#endif
41
42#ifndef lint
43#if 0
44static char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94";
45#endif
46static const char rcsid[] =
47 "$FreeBSD: head/libexec/ftpd/ftpd.c 70205 2000-12-20 03:34:54Z dan $";
48#endif /* not lint */
49
50/*
51 * FTP server.
52 */
53#include <sys/param.h>
54#include <sys/ioctl.h>
55#include <sys/mman.h>
--- 1688 unchanged lines hidden (view full) ---
1744 int err;
1745
1746 len = filesize;
1747 err = cnt = offset = 0;
1748
1749 while (err != -1 && cnt < filesize) {
1750 err = sendfile(filefd, netfd, offset, len,
1751 (struct sf_hdtr *) NULL, &cnt, 0);
1752 offset += cnt;
1753 len -= cnt;
1754
1755 if (err == -1) {
1756 if (!cnt)
1757 goto oldway;
1758
1759 goto data_err;
--- 1047 unchanged lines hidden ---
2 * Copyright (c) 1985, 1988, 1990, 1992, 1993, 1994
3 * The Regents of the University of California. 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
--- 30 unchanged lines hidden (view full) ---
39#endif /* not lint */
40#endif
41
42#ifndef lint
43#if 0
44static char sccsid[] = "@(#)ftpd.c 8.4 (Berkeley) 4/16/94";
45#endif
46static const char rcsid[] =
47 "$FreeBSD: head/libexec/ftpd/ftpd.c 70205 2000-12-20 03:34:54Z dan $";
48#endif /* not lint */
49
50/*
51 * FTP server.
52 */
53#include <sys/param.h>
54#include <sys/ioctl.h>
55#include <sys/mman.h>
--- 1688 unchanged lines hidden (view full) ---
1744 int err;
1745
1746 len = filesize;
1747 err = cnt = offset = 0;
1748
1749 while (err != -1 && cnt < filesize) {
1750 err = sendfile(filefd, netfd, offset, len,
1751 (struct sf_hdtr *) NULL, &cnt, 0);
1752 offset += cnt;
1753 len -= cnt;
1754
1755 if (err == -1) {
1756 if (!cnt)
1757 goto oldway;
1758
1759 goto data_err;
--- 1047 unchanged lines hidden ---