Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-4]: src/usr.bin/ftp pullup 1.41->1.44 (lukem)



details:   https://anonhg.NetBSD.org/src/rev/61fe62c2919c
branches:  netbsd-1-4
changeset: 468905:61fe62c2919c
user:      perry <perry%NetBSD.org@localhost>
date:      Tue Jun 22 21:02:42 1999 +0000

description:
pullup 1.41->1.44 (lukem)

diffstat:

 usr.bin/ftp/ftp.c |  21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diffs (63 lines):

diff -r 7b25950e3e87 -r 61fe62c2919c usr.bin/ftp/ftp.c
--- a/usr.bin/ftp/ftp.c Tue Jun 22 21:02:15 1999 +0000
+++ b/usr.bin/ftp/ftp.c Tue Jun 22 21:02:42 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftp.c,v 1.41 1999/02/19 16:29:27 lukem Exp $   */
+/*     $NetBSD: ftp.c,v 1.41.2.1 1999/06/22 21:02:42 perry Exp $       */
 
 /*
  * Copyright (c) 1985, 1989, 1993, 1994
@@ -38,7 +38,7 @@
 #if 0
 static char sccsid[] = "@(#)ftp.c      8.6 (Berkeley) 10/27/94";
 #else
-__RCSID("$NetBSD: ftp.c,v 1.41 1999/02/19 16:29:27 lukem Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.41.2.1 1999/06/22 21:02:42 perry Exp $");
 #endif
 #endif /* not lint */
 
@@ -992,13 +992,6 @@
        contin2:        ;
                }
 break2:
-               if (bare_lfs) {
-                       fprintf(ttyout,
-                       "WARNING! %d bare linefeeds received in ASCII mode.\n",
-                           bare_lfs);
-                       fputs("File may not have transferred correctly.\n",
-                           ttyout);
-               }
                if (hash && (!progress || filesize < 0)) {
                        if (bytes < hashbytes)
                                (void)putc('#', ttyout);
@@ -1022,6 +1015,12 @@
                (void)signal(SIGPIPE, oldintp);
        (void)fclose(din);
        (void)getreply(0);
+       if (bare_lfs) {
+               fprintf(ttyout,
+                   "WARNING! %d bare linefeeds received in ASCII mode.\n",
+                   bare_lfs);
+               fputs("File may not have transferred correctly.\n", ttyout);
+       }
        if (bytes >= 0 && is_retr) {
                if (bytes > 0)
                        ptransfer(0);
@@ -1045,7 +1044,7 @@
 
 abort:
 
-/* abort using RFC959 recommended IP,SYNC sequence */
+/* abort using RFC 959 recommended IP,SYNC sequence */
 
        progress = oprogress;
        preserve = opreserve;
@@ -1604,7 +1603,7 @@
         * send IAC in urgent mode instead of DM because 4.3BSD places oob mark
         * after urgent byte rather than before as is protocol now
         */
-       sprintf(buf, "%c%c%c", IAC, IP, IAC);
+       snprintf(buf, sizeof(buf), "%c%c%c", IAC, IP, IAC);
        if (send(fileno(cout), buf, 3, MSG_OOB) != 3)
                warn("abort");
        fprintf(cout, "%cABOR\r\n", DM);



Home | Main Index | Thread Index | Old Index