diff --git a/ChangeLog b/ChangeLog index 79ce8267b..5f9913adb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ - (dtucker) [auth-sia.c configure.ac] Tru64 update from cmadams at hiwaay.net. Use permanently_set_uid for SIA, only define DISABLE_FD_PASSING when SIA is enabled, rely on SIA to check for locked accounts if enabled. ok djm@ + - (djm) [scp.c] Rename limitbw -> limit_rate to match upstreamed patch 20031121 - (djm) OpenBSD CVS Sync @@ -1507,4 +1508,4 @@ - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. Report from murple@murple.net, diagnosis from dtucker@zip.com.au -$Id: ChangeLog,v 1.3122 2003/11/22 03:25:15 dtucker Exp $ +$Id: ChangeLog,v 1.3123 2003/11/22 03:39:04 djm Exp $ diff --git a/scp.c b/scp.c index 10f6428b2..53172c12d 100644 --- a/scp.c +++ b/scp.c @@ -92,7 +92,7 @@ void bwlimit(int); arglist args; /* Bandwidth limit */ -off_t limitbw = 0; +off_t limit_rate = 0; /* Name of current file being transferred. */ char *curfile; @@ -257,7 +257,7 @@ main(int argc, char **argv) speed = strtod(optarg, &endp); if (speed <= 0 || *endp != '\0') usage(); - limitbw = speed * 1024; + limit_rate = speed * 1024; break; case 'p': pflag = 1; @@ -589,7 +589,7 @@ next: (void) close(fd); haderr = result >= 0 ? EIO : errno; statbytes += result; } - if (limitbw) + if (limit_rate) bwlimit(amt); } if (showprogress) @@ -681,7 +681,7 @@ bwlimit(int amount) return; lamt *= 8; - wait = (double)1000000L * lamt / limitbw; + wait = (double)1000000L * lamt / limit_rate; bwstart.tv_sec = wait / 1000000L; bwstart.tv_usec = wait % 1000000L; @@ -908,7 +908,7 @@ bad: run_err("%s: %s", np, strerror(errno)); statbytes += j; } while (amt > 0); - if (limitbw) + if (limit_rate) bwlimit(4096); if (count == bp->cnt) {