summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-11-22 14:39:04 +1100
committerDamien Miller <djm@mindrot.org>2003-11-22 14:39:04 +1100
commit4da295c051d9d02a73a46432ac116c31b6839274 (patch)
treef74e1932c6feb10a3d91a3b8d111a67d04299c67
parent28e7dfdb06fad2d6a146122251383dbee5f0a60d (diff)
- (djm) [scp.c] Rename limitbw -> limit_rate to match upstreamed patch
-rw-r--r--ChangeLog3
-rw-r--r--scp.c10
2 files changed, 7 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 79ce8267b..5f9913adb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
1020031121 1120031121
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 $
diff --git a/scp.c b/scp.c
index 10f6428b2..53172c12d 100644
--- a/scp.c
+++ b/scp.c
@@ -92,7 +92,7 @@ void bwlimit(int);
92arglist args; 92arglist args;
93 93
94/* Bandwidth limit */ 94/* Bandwidth limit */
95off_t limitbw = 0; 95off_t limit_rate = 0;
96 96
97/* Name of current file being transferred. */ 97/* Name of current file being transferred. */
98char *curfile; 98char *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) {