aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-05-01 17:42:19 +0200
committerDaniel Stenberg <daniel@haxx.se>2020-05-02 16:38:48 +0200
commitdf2093d2930bc8f4f81218f626eb886603180072 (patch)
tree1429b574089a7df37cf473d2a2886e9594fccdd6 /lib
parent5cb7f893dfafaff3d37a12eb6ad57eba53760943 (diff)
libssh2: set the expected total size in SCP upload init
... as otherwise the progress callback gets called without that information, making the progress meter have less info. Reported-by: Murugan Balraj Bug: https://curl.haxx.se/mail/archive-2020-05/0000.html Closes #5317
Diffstat (limited to 'lib')
-rw-r--r--lib/vssh/libssh2.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index c487ccabb..2acd7c6cc 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -2551,7 +2551,9 @@ static CURLcode ssh_statemach_act(struct connectdata *conn, bool *block)
}
/* upload data */
- Curl_setup_transfer(data, -1, data->req.size, FALSE, FIRSTSOCKET);
+ data->req.size = data->state.infilesize;
+ Curl_pgrsSetUploadSize(data, data->state.infilesize);
+ Curl_setup_transfer(data, -1, -1, FALSE, FIRSTSOCKET);
/* not set by Curl_setup_transfer to preserve keepon bits */
conn->sockfd = conn->writesockfd;