mirror of
git://anongit.mindrot.org/openssh.git
synced 2024-12-25 11:22:10 +00:00
- (djm) [scp.c] Rename limitbw -> limit_rate to match upstreamed patch
This commit is contained in:
parent
28e7dfdb06
commit
4da295c051
@ -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 $
|
||||
|
10
scp.c
10
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user