- (bal) scp.c 'limit' conflicts with Cray. Rename to 'limitbw'
This commit is contained in:
parent
5bd6eb71da
commit
d54d9382a4
|
@ -7,6 +7,7 @@
|
||||||
[version.h]
|
[version.h]
|
||||||
enter 3.6
|
enter 3.6
|
||||||
- (bal) The days of lack of int64_t support are over. Sorry kids.
|
- (bal) The days of lack of int64_t support are over. Sorry kids.
|
||||||
|
- (bal) scp.c 'limit' conflicts with Cray. Rename to 'limitbw'
|
||||||
|
|
||||||
20030318
|
20030318
|
||||||
- (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
|
- (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
|
||||||
|
@ -1232,4 +1233,4 @@
|
||||||
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
save auth method before monitor_reset_key_state(); bugzilla bug #284;
|
||||||
ok provos@
|
ok provos@
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.2634 2003/03/21 00:34:34 mouring Exp $
|
$Id: ChangeLog,v 1.2635 2003/03/21 00:55:32 mouring Exp $
|
||||||
|
|
10
scp.c
10
scp.c
|
@ -96,7 +96,7 @@ void bwlimit(int);
|
||||||
arglist args;
|
arglist args;
|
||||||
|
|
||||||
/* Bandwidth limit */
|
/* Bandwidth limit */
|
||||||
off_t limit = 0;
|
off_t limitbw = 0;
|
||||||
|
|
||||||
/* Name of current file being transferred. */
|
/* Name of current file being transferred. */
|
||||||
char *curfile;
|
char *curfile;
|
||||||
|
@ -251,7 +251,7 @@ main(argc, argv)
|
||||||
speed = strtod(optarg, &endp);
|
speed = strtod(optarg, &endp);
|
||||||
if (speed <= 0 || *endp != '\0')
|
if (speed <= 0 || *endp != '\0')
|
||||||
usage();
|
usage();
|
||||||
limit = speed * 1024;
|
limitbw = speed * 1024;
|
||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
pflag = 1;
|
pflag = 1;
|
||||||
|
@ -594,7 +594,7 @@ next: (void) close(fd);
|
||||||
haderr = result >= 0 ? EIO : errno;
|
haderr = result >= 0 ? EIO : errno;
|
||||||
statbytes += result;
|
statbytes += result;
|
||||||
}
|
}
|
||||||
if (limit)
|
if (limitbw)
|
||||||
bwlimit(amt);
|
bwlimit(amt);
|
||||||
}
|
}
|
||||||
if (showprogress)
|
if (showprogress)
|
||||||
|
@ -688,7 +688,7 @@ bwlimit(int amount)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
lamt *= 8;
|
lamt *= 8;
|
||||||
wait = (double)1000000L * lamt / limit;
|
wait = (double)1000000L * lamt / limitbw;
|
||||||
|
|
||||||
bwstart.tv_sec = wait / 1000000L;
|
bwstart.tv_sec = wait / 1000000L;
|
||||||
bwstart.tv_usec = wait % 1000000L;
|
bwstart.tv_usec = wait % 1000000L;
|
||||||
|
@ -917,7 +917,7 @@ bad: run_err("%s: %s", np, strerror(errno));
|
||||||
statbytes += j;
|
statbytes += j;
|
||||||
} while (amt > 0);
|
} while (amt > 0);
|
||||||
|
|
||||||
if (limit)
|
if (limitbw)
|
||||||
bwlimit(4096);
|
bwlimit(4096);
|
||||||
|
|
||||||
if (count == bp->cnt) {
|
if (count == bp->cnt) {
|
||||||
|
|
Loading…
Reference in New Issue