Source-Changes-HG archive

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

[src/netbsd-1-5]: src/libexec/ftpd Pull up revision 1.96:



details:   https://anonhg.NetBSD.org/src/rev/7441dd526150
branches:  netbsd-1-5
changeset: 488223:7441dd526150
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu Jun 22 08:45:10 2000 +0000

description:
Pull up revision 1.96:
  - fix RATE{GET,PUT} when the client is slower than the rate limit
  - document units RATE{GET,PUT} use
Fixes PR#10390

diffstat:

 libexec/ftpd/ftpd.c |  14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diffs (42 lines):

diff -r 97e5ee27601d -r 7441dd526150 libexec/ftpd/ftpd.c
--- a/libexec/ftpd/ftpd.c       Thu Jun 22 08:42:26 2000 +0000
+++ b/libexec/ftpd/ftpd.c       Thu Jun 22 08:45:10 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ftpd.c,v 1.95 2000/06/19 15:15:04 lukem Exp $  */
+/*     $NetBSD: ftpd.c,v 1.95.2.1 2000/06/22 08:45:10 lukem Exp $      */
 
 /*
  * Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
@@ -109,7 +109,7 @@
 #if 0
 static char sccsid[] = "@(#)ftpd.c     8.5 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: ftpd.c,v 1.95 2000/06/19 15:15:04 lukem Exp $");
+__RCSID("$NetBSD: ftpd.c,v 1.95.2.1 2000/06/22 08:45:10 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -1448,9 +1448,8 @@
                                }
                                (void)gettimeofday(&now, NULL);
                                timersub(&now, &then, &td);
-                               if (td.tv_sec > 0)
-                                       break;
-                               usleep(1000000 - td.tv_usec);
+                               if (td.tv_sec == 0)
+                                       usleep(1000000 - td.tv_usec);
                        }
                } else {
                        while ((c = read(filefd, buf, (size_t)blksize)) > 0) {
@@ -1553,9 +1552,8 @@
                                }
                                (void)gettimeofday(&now, NULL);
                                timersub(&now, &then, &td);
-                               if (td.tv_sec > 0)
-                                       break;
-                               usleep(1000000 - td.tv_usec);
+                               if (td.tv_sec == 0)
+                                       usleep(1000000 - td.tv_usec);
                        }
                } else {
                        while ((c = read(netfd, buf, sizeof(buf))) > 0) {



Home | Main Index | Thread Index | Old Index