diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | scp.c | 10 |
2 files changed, 7 insertions, 6 deletions
@@ -7,6 +7,7 @@ | |||
7 | [version.h] | 7 | [version.h] |
8 | enter 3.6 | 8 | enter 3.6 |
9 | - (bal) The days of lack of int64_t support are over. Sorry kids. | 9 | - (bal) The days of lack of int64_t support are over. Sorry kids. |
10 | - (bal) scp.c 'limit' conflicts with Cray. Rename to 'limitbw' | ||
10 | 11 | ||
11 | 20030318 | 12 | 20030318 |
12 | - (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] | 13 | - (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h] |
@@ -1232,4 +1233,4 @@ | |||
1232 | save auth method before monitor_reset_key_state(); bugzilla bug #284; | 1233 | save auth method before monitor_reset_key_state(); bugzilla bug #284; |
1233 | ok provos@ | 1234 | ok provos@ |
1234 | 1235 | ||
1235 | $Id: ChangeLog,v 1.2633.2.1 2003/03/21 00:51:35 mouring Exp $ | 1236 | $Id: ChangeLog,v 1.2633.2.2 2003/03/21 00:54:03 mouring Exp $ |
@@ -96,7 +96,7 @@ void bwlimit(int); | |||
96 | arglist args; | 96 | arglist args; |
97 | 97 | ||
98 | /* Bandwidth limit */ | 98 | /* Bandwidth limit */ |
99 | off_t limit = 0; | 99 | off_t limitbw = 0; |
100 | 100 | ||
101 | /* Name of current file being transferred. */ | 101 | /* Name of current file being transferred. */ |
102 | char *curfile; | 102 | char *curfile; |
@@ -251,7 +251,7 @@ main(argc, argv) | |||
251 | speed = strtod(optarg, &endp); | 251 | speed = strtod(optarg, &endp); |
252 | if (speed <= 0 || *endp != '\0') | 252 | if (speed <= 0 || *endp != '\0') |
253 | usage(); | 253 | usage(); |
254 | limit = speed * 1024; | 254 | limitbw = speed * 1024; |
255 | break; | 255 | break; |
256 | case 'p': | 256 | case 'p': |
257 | pflag = 1; | 257 | pflag = 1; |
@@ -594,7 +594,7 @@ next: (void) close(fd); | |||
594 | haderr = result >= 0 ? EIO : errno; | 594 | haderr = result >= 0 ? EIO : errno; |
595 | statbytes += result; | 595 | statbytes += result; |
596 | } | 596 | } |
597 | if (limit) | 597 | if (limitbw) |
598 | bwlimit(amt); | 598 | bwlimit(amt); |
599 | } | 599 | } |
600 | if (showprogress) | 600 | if (showprogress) |
@@ -688,7 +688,7 @@ bwlimit(int amount) | |||
688 | return; | 688 | return; |
689 | 689 | ||
690 | lamt *= 8; | 690 | lamt *= 8; |
691 | wait = (double)1000000L * lamt / limit; | 691 | wait = (double)1000000L * lamt / limitbw; |
692 | 692 | ||
693 | bwstart.tv_sec = wait / 1000000L; | 693 | bwstart.tv_sec = wait / 1000000L; |
694 | bwstart.tv_usec = wait % 1000000L; | 694 | bwstart.tv_usec = wait % 1000000L; |
@@ -917,7 +917,7 @@ bad: run_err("%s: %s", np, strerror(errno)); | |||
917 | statbytes += j; | 917 | statbytes += j; |
918 | } while (amt > 0); | 918 | } while (amt > 0); |
919 | 919 | ||
920 | if (limit) | 920 | if (limitbw) |
921 | bwlimit(4096); | 921 | bwlimit(4096); |
922 | 922 | ||
923 | if (count == bp->cnt) { | 923 | if (count == bp->cnt) { |