ftpd.c (99195) | ftpd.c (99212) |
---|---|
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[] = | 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 99195 2002-07-01 02:30:11Z mdodd $"; | 47 "$FreeBSD: head/libexec/ftpd/ftpd.c 99212 2002-07-01 14:29:44Z maxim $"; |
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> --- 1771 unchanged lines hidden (view full) --- 1827 off_t offset; 1828 int err; 1829 1830 err = cnt = offset = 0; 1831 1832 while (err != -1 && filesize > 0) { 1833 err = sendfile(filefd, netfd, offset, 0, 1834 (struct sf_hdtr *) NULL, &cnt, 0); | 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> --- 1771 unchanged lines hidden (view full) --- 1827 off_t offset; 1828 int err; 1829 1830 err = cnt = offset = 0; 1831 1832 while (err != -1 && filesize > 0) { 1833 err = sendfile(filefd, netfd, offset, 0, 1834 (struct sf_hdtr *) NULL, &cnt, 0); |
1835 /* 1836 * Calculate byte_count before OOB processing. 1837 * It can be used in myoob() later. 1838 */ 1839 byte_count += cnt; |
|
1835 if (recvurg) 1836 goto got_oob; | 1840 if (recvurg) 1841 goto got_oob; |
1837 byte_count += cnt; | |
1838 offset += cnt; 1839 filesize -= cnt; 1840 1841 if (err == -1) { 1842 if (!cnt) 1843 goto oldway; 1844 1845 goto data_err; --- 1022 unchanged lines hidden --- | 1842 offset += cnt; 1843 filesize -= cnt; 1844 1845 if (err == -1) { 1846 if (!cnt) 1847 goto oldway; 1848 1849 goto data_err; --- 1022 unchanged lines hidden --- |