summaryrefslogtreecommitdiff
path: root/sftp-int.c
diff options
context:
space:
mode:
Diffstat (limited to 'sftp-int.c')
-rw-r--r--sftp-int.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/sftp-int.c b/sftp-int.c
index f86922d0c..babc0ed60 100644
--- a/sftp-int.c
+++ b/sftp-int.c
@@ -26,7 +26,7 @@
26/* XXX: recursive operations */ 26/* XXX: recursive operations */
27 27
28#include "includes.h" 28#include "includes.h"
29RCSID("$OpenBSD: sftp-int.c,v 1.42 2002/02/05 00:00:46 djm Exp $"); 29RCSID("$OpenBSD: sftp-int.c,v 1.43 2002/02/12 12:32:27 djm Exp $");
30 30
31#include "buffer.h" 31#include "buffer.h"
32#include "xmalloc.h" 32#include "xmalloc.h"
@@ -45,6 +45,9 @@ extern FILE *infile;
45/* Size of buffer used when copying files */ 45/* Size of buffer used when copying files */
46extern size_t copy_buffer_len; 46extern size_t copy_buffer_len;
47 47
48/* Number of concurrent outstanding requests */
49extern int num_requests;
50
48/* Version of server we are speaking to */ 51/* Version of server we are speaking to */
49int version; 52int version;
50 53
@@ -385,7 +388,7 @@ process_get(int in, int out, char *src, char *dst, char *pwd, int pflag)
385 } 388 }
386 printf("Fetching %s to %s\n", g.gl_pathv[0], abs_dst); 389 printf("Fetching %s to %s\n", g.gl_pathv[0], abs_dst);
387 err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag, 390 err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag,
388 copy_buffer_len); 391 copy_buffer_len, num_requests);
389 goto out; 392 goto out;
390 } 393 }
391 394
@@ -410,7 +413,7 @@ process_get(int in, int out, char *src, char *dst, char *pwd, int pflag)
410 413
411 printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst); 414 printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
412 if (do_download(in, out, g.gl_pathv[i], abs_dst, pflag, 415 if (do_download(in, out, g.gl_pathv[i], abs_dst, pflag,
413 copy_buffer_len) == -1) 416 copy_buffer_len, num_requests) == -1)
414 err = -1; 417 err = -1;
415 xfree(abs_dst); 418 xfree(abs_dst);
416 abs_dst = NULL; 419 abs_dst = NULL;
@@ -469,7 +472,7 @@ process_put(int in, int out, char *src, char *dst, char *pwd, int pflag)
469 } 472 }
470 printf("Uploading %s to %s\n", g.gl_pathv[0], abs_dst); 473 printf("Uploading %s to %s\n", g.gl_pathv[0], abs_dst);
471 err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag, 474 err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag,
472 copy_buffer_len); 475 copy_buffer_len, num_requests);
473 goto out; 476 goto out;
474 } 477 }
475 478
@@ -494,7 +497,7 @@ process_put(int in, int out, char *src, char *dst, char *pwd, int pflag)
494 497
495 printf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst); 498 printf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst);
496 if (do_upload(in, out, g.gl_pathv[i], abs_dst, pflag, 499 if (do_upload(in, out, g.gl_pathv[i], abs_dst, pflag,
497 copy_buffer_len) == -1) 500 copy_buffer_len, num_requests) == -1)
498 err = -1; 501 err = -1;
499 } 502 }
500 503