]> andersk Git - openssh.git/blobdiff - scp.c
[configure.ac] Make sure -lcrypto is before -lsocket for sco3. ok mouring@
[openssh.git] / scp.c
diff --git a/scp.c b/scp.c
index 364ab2860d53470affd699b65ef873236d6f68e5..1daa2ccf7a26b54c281a479e8a5e35f22de10d2d 100644 (file)
--- a/scp.c
+++ b/scp.c
@@ -71,7 +71,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: scp.c,v 1.110 2003/10/08 08:27:36 jmc Exp $");
+RCSID("$OpenBSD: scp.c,v 1.113 2003/11/23 23:21:21 djm Exp $");
 
 #include "xmalloc.h"
 #include "atomicio.h"
@@ -92,7 +92,7 @@ void bwlimit(int);
 arglist args;
 
 /* Bandwidth limit */
-off_t limitbw = 0;
+off_t limit_rate = 0;
 
 /* Name of current file being transferred. */
 char *curfile;
@@ -257,7 +257,7 @@ main(int argc, char **argv)
                        speed = strtod(optarg, &endp);
                        if (speed <= 0 || *endp != '\0')
                                usage();
-                       limitbw = speed * 1024;
+                       limit_rate = speed * 1024;
                        break;
                case 'p':
                        pflag = 1;
@@ -273,6 +273,7 @@ main(int argc, char **argv)
                        verbose_mode = 1;
                        break;
                case 'q':
+                       addargs(&args, "-q");
                        showprogress = 0;
                        break;
 
@@ -588,7 +589,7 @@ next:                       (void) close(fd);
                                        haderr = result >= 0 ? EIO : errno;
                                statbytes += result;
                        }
-                       if (limitbw)
+                       if (limit_rate)
                                bwlimit(amt);
                }
                if (showprogress)
@@ -680,7 +681,7 @@ bwlimit(int amount)
                return;
 
        lamt *= 8;
-       wait = (double)1000000L * lamt / limitbw;
+       wait = (double)1000000L * lamt / limit_rate;
 
        bwstart.tv_sec = wait / 1000000L;
        bwstart.tv_usec = wait % 1000000L;
@@ -906,8 +907,8 @@ bad:                        run_err("%s: %s", np, strerror(errno));
                                cp += j;
                                statbytes += j;
                        } while (amt > 0);
-               
-                       if (limitbw)
+
+                       if (limit_rate)
                                bwlimit(4096);
 
                        if (count == bp->cnt) {
This page took 0.049472 seconds and 4 git commands to generate.