diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | scp.c | 10 |
2 files changed, 7 insertions, 6 deletions
@@ -6,6 +6,7 @@ | |||
6 | - (dtucker) [auth-sia.c configure.ac] Tru64 update from cmadams at hiwaay.net. | 6 | - (dtucker) [auth-sia.c configure.ac] Tru64 update from cmadams at hiwaay.net. |
7 | Use permanently_set_uid for SIA, only define DISABLE_FD_PASSING when SIA | 7 | Use permanently_set_uid for SIA, only define DISABLE_FD_PASSING when SIA |
8 | is enabled, rely on SIA to check for locked accounts if enabled. ok djm@ | 8 | is enabled, rely on SIA to check for locked accounts if enabled. ok djm@ |
9 | - (djm) [scp.c] Rename limitbw -> limit_rate to match upstreamed patch | ||
9 | 10 | ||
10 | 20031121 | 11 | 20031121 |
11 | - (djm) OpenBSD CVS Sync | 12 | - (djm) OpenBSD CVS Sync |
@@ -1507,4 +1508,4 @@ | |||
1507 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. | 1508 | - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. |
1508 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au | 1509 | Report from murple@murple.net, diagnosis from dtucker@zip.com.au |
1509 | 1510 | ||
1510 | $Id: ChangeLog,v 1.3122 2003/11/22 03:25:15 dtucker Exp $ | 1511 | $Id: ChangeLog,v 1.3123 2003/11/22 03:39:04 djm Exp $ |
@@ -92,7 +92,7 @@ void bwlimit(int); | |||
92 | arglist args; | 92 | arglist args; |
93 | 93 | ||
94 | /* Bandwidth limit */ | 94 | /* Bandwidth limit */ |
95 | off_t limitbw = 0; | 95 | off_t limit_rate = 0; |
96 | 96 | ||
97 | /* Name of current file being transferred. */ | 97 | /* Name of current file being transferred. */ |
98 | char *curfile; | 98 | char *curfile; |
@@ -257,7 +257,7 @@ main(int argc, char **argv) | |||
257 | speed = strtod(optarg, &endp); | 257 | speed = strtod(optarg, &endp); |
258 | if (speed <= 0 || *endp != '\0') | 258 | if (speed <= 0 || *endp != '\0') |
259 | usage(); | 259 | usage(); |
260 | limitbw = speed * 1024; | 260 | limit_rate = speed * 1024; |
261 | break; | 261 | break; |
262 | case 'p': | 262 | case 'p': |
263 | pflag = 1; | 263 | pflag = 1; |
@@ -589,7 +589,7 @@ next: (void) close(fd); | |||
589 | haderr = result >= 0 ? EIO : errno; | 589 | haderr = result >= 0 ? EIO : errno; |
590 | statbytes += result; | 590 | statbytes += result; |
591 | } | 591 | } |
592 | if (limitbw) | 592 | if (limit_rate) |
593 | bwlimit(amt); | 593 | bwlimit(amt); |
594 | } | 594 | } |
595 | if (showprogress) | 595 | if (showprogress) |
@@ -681,7 +681,7 @@ bwlimit(int amount) | |||
681 | return; | 681 | return; |
682 | 682 | ||
683 | lamt *= 8; | 683 | lamt *= 8; |
684 | wait = (double)1000000L * lamt / limitbw; | 684 | wait = (double)1000000L * lamt / limit_rate; |
685 | 685 | ||
686 | bwstart.tv_sec = wait / 1000000L; | 686 | bwstart.tv_sec = wait / 1000000L; |
687 | bwstart.tv_usec = wait % 1000000L; | 687 | bwstart.tv_usec = wait % 1000000L; |
@@ -908,7 +908,7 @@ bad: run_err("%s: %s", np, strerror(errno)); | |||
908 | statbytes += j; | 908 | statbytes += j; |
909 | } while (amt > 0); | 909 | } while (amt > 0); |
910 | 910 | ||
911 | if (limitbw) | 911 | if (limit_rate) |
912 | bwlimit(4096); | 912 | bwlimit(4096); |
913 | 913 | ||
914 | if (count == bp->cnt) { | 914 | if (count == bp->cnt) { |