--- proftpd-1.2.2rc1/src/data.c.sendfile Thu Feb 15 15:24:53 2001
+++ proftpd-1.2.2rc1/src/data.c Tue Apr 17 21:35:24 2001
@@ -760,7 +760,9 @@
*
* ssize_t sendfile(int out_fd, int in_fd, off_t *offset, size_t count)
*/
- if((len = sendfile(session.d->outf->fd, retr_fd, offset, count)) == -1) {
+ len = sendfile(session.d->outf->fd, retr_fd, offset, count);
+ if (len == -1 || len > 0 && len < count) {
+ errno = EINTR;
#elif defined(HAVE_BSD_SENDFILE)
/* BSD semantics for sendfile are flexible...it'd be nice if we could
* standardize on something like it. The semantics are:
@@ -797,7 +799,9 @@
if((count -= len) <= 0)
break;
+#if !defined(HAVE_LINUX_SENDFILE)
*offset += len;
+#endif
if(TimeoutStalled)
reset_timer(TIMER_STALLED, ANY_MODULE);
-Yenya
-- \ Jan "Yenya" Kasprzak <kas at fi.muni.cz> http://www.fi.muni.cz/~kas/ \\ PGP: finger kas at aisa.fi.muni.cz 0D99A7FB206605D7 8B35FCDE05B18A5E // \\\ Czech Linux Homepage: http://www.linux.cz/ /// Mantra: "everything is a stream of bytes". Repeat until enlightened. --Linus - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/