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 74100 2001-03-11 13:20:44Z des $"; |
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 byte_count += cnt; |
1753 offset += cnt; 1754 len -= cnt; 1755 1756 if (err == -1) { 1757 if (!cnt) 1758 goto oldway; 1759 1760 goto data_err; --- 1047 unchanged lines hidden --- |