summaryrefslogtreecommitdiff
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 12:12:29 +0200
commit5e30d827bab57aeb2ba4f2416a89d285e76d5f26 (patch)
treed7ec7a25e17ef4eed17d64631be26f4f42438b83
parent6540cbbc751efa010ef996a6f1726d2c4f1ed91d (diff)
downloadcurl-bagder/scp-set-total-upload-size.tar.gz
libssh2: set the expected total size in SCP upload initbagder/scp-set-total-upload-size
... 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
-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;