]> andersk Git - openssh.git/commitdiff
- (bal) scp.c 'limit' conflicts with Cray. Rename to 'limitbw'
authormouring <mouring>
Fri, 21 Mar 2003 00:55:32 +0000 (00:55 +0000)
committermouring <mouring>
Fri, 21 Mar 2003 00:55:32 +0000 (00:55 +0000)
ChangeLog
scp.c

index 6caf3f3e4cc19128f17b3a7e277a078de6b9305f..d4e95c24e1e3a7ec1ee0f0b22c64918d73fed4b2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,7 @@
      [version.h]
      enter 3.6
  - (bal) The days of lack of int64_t support are over.  Sorry kids.
+ - (bal) scp.c 'limit' conflicts with Cray.  Rename to 'limitbw'
 
 20030318
  - (tim) [configure.ac openbsd-compat/bsd-misc.c openbsd-compat/bsd-misc.h]
diff --git a/scp.c b/scp.c
index ab67c0bb8b7fe79f952bbcf3ab4a3ca6265e8bb7..35d4c5f7143e5a23bdf659f7a8200125fb7fdcab 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -96,7 +96,7 @@ void bwlimit(int);
 arglist args;
 
 /* Bandwidth limit */
-off_t limit = 0;
+off_t limitbw = 0;
 
 /* Name of current file being transferred. */
 char *curfile;
@@ -251,7 +251,7 @@ main(argc, argv)
                        speed = strtod(optarg, &endp);
                        if (speed <= 0 || *endp != '\0')
                                usage();
-                       limit = speed * 1024;
+                       limitbw = speed * 1024;
                        break;
                case 'p':
                        pflag = 1;
@@ -594,7 +594,7 @@ next:                       (void) close(fd);
                                        haderr = result >= 0 ? EIO : errno;
                                statbytes += result;
                        }
-                       if (limit)
+                       if (limitbw)
                                bwlimit(amt);
                }
                if (showprogress)
@@ -688,7 +688,7 @@ bwlimit(int amount)
                return;
 
        lamt *= 8;
-       wait = (double)1000000L * lamt / limit;
+       wait = (double)1000000L * lamt / limitbw;
 
        bwstart.tv_sec = wait / 1000000L;
        bwstart.tv_usec = wait % 1000000L;
@@ -917,7 +917,7 @@ bad:                        run_err("%s: %s", np, strerror(errno));
                                statbytes += j;
                        } while (amt > 0);
                
-                       if (limit)
+                       if (limitbw)
                                bwlimit(4096);
 
                        if (count == bp->cnt) {
This page took 0.531502 seconds and 5 git commands to generate.