From be82406f957633120bc36b1286316991bf54abf9 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Wed, 29 May 1996 23:05:46 +0000 Subject: [PATCH] Fix bare newline bug. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@543 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftpd/ftpd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/appl/ftp/ftpd/ftpd.c b/appl/ftp/ftpd/ftpd.c index f84beaebc..0965c67fe 100644 --- a/appl/ftp/ftpd/ftpd.c +++ b/appl/ftp/ftpd/ftpd.c @@ -1173,7 +1173,8 @@ receive_data(FILE *instr, FILE *outstr) { char *p, *q; int cr_flag = 0; - while ((cnt = auth_read(fileno(instr), buf+cr_flag, sizeof(buf))) > 0){ + while ((cnt = auth_read(fileno(instr), buf+cr_flag, + sizeof(buf)-cr_flag)) > 0){ byte_count += cnt; cr_flag = 0; for(p = buf, q = buf; p < buf + cnt;){ @@ -1522,7 +1523,11 @@ dologout(int status) k_unlog(); } /* beware of flushing buffers after a SIGPIPE */ +#ifdef XXX + exit(status); +#else _exit(status); +#endif } void abor(void)