mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-31 01:35:11 +02: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.
|
- (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
|
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@
|
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
|
20031121
|
||||||
- (djm) OpenBSD CVS Sync
|
- (djm) OpenBSD CVS Sync
|
||||||
@ -1507,4 +1508,4 @@
|
|||||||
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
|
||||||
Report from murple@murple.net, diagnosis from dtucker@zip.com.au
|
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;
|
arglist args;
|
||||||
|
|
||||||
/* Bandwidth limit */
|
/* Bandwidth limit */
|
||||||
off_t limitbw = 0;
|
off_t limit_rate = 0;
|
||||||
|
|
||||||
/* Name of current file being transferred. */
|
/* Name of current file being transferred. */
|
||||||
char *curfile;
|
char *curfile;
|
||||||
@ -257,7 +257,7 @@ main(int argc, char **argv)
|
|||||||
speed = strtod(optarg, &endp);
|
speed = strtod(optarg, &endp);
|
||||||
if (speed <= 0 || *endp != '\0')
|
if (speed <= 0 || *endp != '\0')
|
||||||
usage();
|
usage();
|
||||||
limitbw = speed * 1024;
|
limit_rate = speed * 1024;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
pflag = 1;
|
pflag = 1;
|
||||||
@ -589,7 +589,7 @@ next: (void) close(fd);
|
|||||||
haderr = result >= 0 ? EIO : errno;
|
haderr = result >= 0 ? EIO : errno;
|
||||||
statbytes += result;
|
statbytes += result;
|
||||||
}
|
}
|
||||||
if (limitbw)
|
if (limit_rate)
|
||||||
bwlimit(amt);
|
bwlimit(amt);
|
||||||
}
|
}
|
||||||
if (showprogress)
|
if (showprogress)
|
||||||
@ -681,7 +681,7 @@ bwlimit(int amount)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
lamt *= 8;
|
lamt *= 8;
|
||||||
wait = (double)1000000L * lamt / limitbw;
|
wait = (double)1000000L * lamt / limit_rate;
|
||||||
|
|
||||||
bwstart.tv_sec = wait / 1000000L;
|
bwstart.tv_sec = wait / 1000000L;
|
||||||
bwstart.tv_usec = wait % 1000000L;
|
bwstart.tv_usec = wait % 1000000L;
|
||||||
@ -908,7 +908,7 @@ bad: run_err("%s: %s", np, strerror(errno));
|
|||||||
statbytes += j;
|
statbytes += j;
|
||||||
} while (amt > 0);
|
} while (amt > 0);
|
||||||
|
|
||||||
if (limitbw)
|
if (limit_rate)
|
||||||
bwlimit(4096);
|
bwlimit(4096);
|
||||||
|
|
||||||
if (count == bp->cnt) {
|
if (count == bp->cnt) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user