summaryrefslogtreecommitdiff
path: root/sftp-int.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-02-13 14:03:56 +1100
committerDamien Miller <djm@mindrot.org>2002-02-13 14:03:56 +1100
commit16a133339a40396064effee3de55f6b2a887d3d2 (patch)
tree6369f7bf93f345d8da84e8a2adbaf8ec475593a1 /sftp-int.c
parentafc7a5d7741ad59a2efe2db6b928c89bf0928098 (diff)
- djm@cvs.openbsd.org 2002/02/12 12:32:27
[sftp.1 sftp.c sftp-client.c sftp-client.h sftp-int.c] Perform multiple overlapping read/write requests in file transfer. Mostly done by Tobias Ringstrom <tori@ringstrom.mine.nu>; ok markus@
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 f86922d0..babc0ed6 100644
--- a/sftp-int.c
+++ b/sftp-int.c
@@ -26,7 +26,7 @@
/* XXX: recursive operations */
#include "includes.h"
-RCSID("$OpenBSD: sftp-int.c,v 1.42 2002/02/05 00:00:46 djm Exp $");
+RCSID("$OpenBSD: sftp-int.c,v 1.43 2002/02/12 12:32:27 djm Exp $");
#include "buffer.h"
#include "xmalloc.h"
@@ -45,6 +45,9 @@ extern FILE *infile;
/* Size of buffer used when copying files */
extern size_t copy_buffer_len;
+/* Number of concurrent outstanding requests */
+extern int num_requests;
+
/* Version of server we are speaking to */
int version;
@@ -385,7 +388,7 @@ process_get(int in, int out, char *src, char *dst, char *pwd, int pflag)
}
printf("Fetching %s to %s\n", g.gl_pathv[0], abs_dst);
err = do_download(in, out, g.gl_pathv[0], abs_dst, pflag,
- copy_buffer_len);
+ copy_buffer_len, num_requests);
goto out;
}
@@ -410,7 +413,7 @@ process_get(int in, int out, char *src, char *dst, char *pwd, int pflag)
printf("Fetching %s to %s\n", g.gl_pathv[i], abs_dst);
if (do_download(in, out, g.gl_pathv[i], abs_dst, pflag,
- copy_buffer_len) == -1)
+ copy_buffer_len, num_requests) == -1)
err = -1;
xfree(abs_dst);
abs_dst = NULL;
@@ -469,7 +472,7 @@ process_put(int in, int out, char *src, char *dst, char *pwd, int pflag)
}
printf("Uploading %s to %s\n", g.gl_pathv[0], abs_dst);
err = do_upload(in, out, g.gl_pathv[0], abs_dst, pflag,
- copy_buffer_len);
+ copy_buffer_len, num_requests);
goto out;
}
@@ -494,7 +497,7 @@ process_put(int in, int out, char *src, char *dst, char *pwd, int pflag)
printf("Uploading %s to %s\n", g.gl_pathv[i], abs_dst);
if (do_upload(in, out, g.gl_pathv[i], abs_dst, pflag,
- copy_buffer_len) == -1)
+ copy_buffer_len, num_requests) == -1)
err = -1;
}