From 96d5f13813367a632020846b1f0f3fb1456e03a1 Mon Sep 17 00:00:00 2001 From: Mark Riordan Date: Thu, 7 Apr 2011 16:40:39 -0500 Subject: scp: Support huge files by changing size to 64-bit type. Signed-off-by: Mark Riordan Signed-off-by: Andreas Schneider --- include/libssh/libssh.h | 3 ++- include/libssh/scp.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'include/libssh') diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 3391ed1..5137cbb 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -430,10 +430,11 @@ LIBSSH_API ssh_scp ssh_scp_new(ssh_session session, int mode, const char *locati LIBSSH_API int ssh_scp_pull_request(ssh_scp scp); LIBSSH_API int ssh_scp_push_directory(ssh_scp scp, const char *dirname, int mode); LIBSSH_API int ssh_scp_push_file(ssh_scp scp, const char *filename, size_t size, int perms); +LIBSSH_API int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t size, int perms); LIBSSH_API int ssh_scp_read(ssh_scp scp, void *buffer, size_t size); LIBSSH_API const char *ssh_scp_request_get_filename(ssh_scp scp); LIBSSH_API int ssh_scp_request_get_permissions(ssh_scp scp); -LIBSSH_API size_t ssh_scp_request_get_size(ssh_scp scp); +LIBSSH_API uint64_t ssh_scp_request_get_size(ssh_scp scp); LIBSSH_API const char *ssh_scp_request_get_warning(ssh_scp scp); LIBSSH_API int ssh_scp_write(ssh_scp scp, const void *buffer, size_t len); LIBSSH_API int ssh_select(ssh_channel *channels, ssh_channel *outchannels, socket_t maxfd, diff --git a/include/libssh/scp.h b/include/libssh/scp.h index 346c98b..d4fa42b 100644 --- a/include/libssh/scp.h +++ b/include/libssh/scp.h @@ -40,8 +40,8 @@ struct ssh_scp_struct { ssh_channel channel; char *location; enum ssh_scp_states state; - size_t filelen; - size_t processed; + uint64_t filelen; + uint64_t processed; enum ssh_scp_request_types request_type; char *request_name; char *warning; -- cgit