diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-05-01 17:42:19 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-05-02 16:38:48 +0200 |
commit | df2093d2930bc8f4f81218f626eb886603180072 (patch) | |
tree | 1429b574089a7df37cf473d2a2886e9594fccdd6 | |
parent | 5cb7f893dfafaff3d37a12eb6ad57eba53760943 (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
-rw-r--r-- | lib/vssh/libssh2.c | 4 |
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; |