Hello members.

I am using libCurl to transfer files via scp and have encountered a problem, 
file upload halts when 1803625280 bytes have been transferred. I've found a 
workaround but I am curious if there is another way to solve the problem.

Some background info:
OS Windows XP (32 bit)
libCurl v 7.21.0
libSSH2 v 1.2.6
openSSL 1.0.0a
zlib 1.2.5


My solution was to change in ssh.c at row 2085:
before:
sshc->ssh_channel = libssh2_scp_send_ex(sshc->ssh_session, sftp_scp->path, 
(int)(data->set.new_file_perms), (size_t)data->set.infilesize, 0, 0);


after:
sshc->ssh_channel = libssh2_scp_send64(sshc->ssh_session, sftp_scp->path, 
(int)(data->set.new_file_perms), data->set.infilesize, 0, 0);

libssh2_scp_send_ex has been deprecated as of v 1.2.6 in favor of 
libssh2_scp_send64.



The root of the problem lies in transferring large files from a 32bit OS. Are 
there any other known workarounds that would have worked for libCurl using 
libSSH2 versions prior to 1.2.6? Making changes in a thirdparty package is 
something I'd like to avoid as things might get messed up the next time it is 
upgraded.

Mikael

                                          
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to