summaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-04-25 14:38:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-05-01 22:55:29 +0200
commite40e9d7f0decc799e3ccfe2c418632f8bb52031a (patch)
tree9099a157e632bd258e64af5373fac96298bce77e /lib/ssh.c
parentc79f4908d461cecaa9976099dcbb8a63b351f19e (diff)
downloadcurl-e40e9d7f0decc799e3ccfe2c418632f8bb52031a.tar.gz
buffer: use data->set.buffer_size instead of BUFSIZE
... to properly use the dynamically set buffer size!
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index 72fa06af7..02dec225f 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -1837,8 +1837,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
/* seekerr == CURL_SEEKFUNC_CANTSEEK (can't seek to offset) */
do {
size_t readthisamountnow =
- (data->state.resume_from - passed > CURL_OFF_T_C(BUFSIZE)) ?
- BUFSIZE : curlx_sotouz(data->state.resume_from - passed);
+ (data->state.resume_from - passed > data->set.buffer_size) ?
+ data->set.buffer_size :
+ curlx_sotouz(data->state.resume_from - passed);
size_t actuallyread =
data->state.fread_func(data->state.buffer, 1,