scp: introduce a 64bits getter to respect ABI
Этот коммит содержится в:
родитель
2cc95e1e08
Коммит
8f1161f649
@ -495,7 +495,8 @@ LIBSSH_API int ssh_scp_push_file64(ssh_scp scp, const char *filename, uint64_t s
|
||||
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 uint64_t ssh_scp_request_get_size(ssh_scp scp);
|
||||
LIBSSH_API size_t ssh_scp_request_get_size(ssh_scp scp);
|
||||
LIBSSH_API uint64_t ssh_scp_request_get_size64(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,
|
||||
|
15
src/scp.c
15
src/scp.c
@ -737,8 +737,21 @@ int ssh_scp_request_get_permissions(ssh_scp scp){
|
||||
/** @brief Get the size of the file being pushed from the other party.
|
||||
*
|
||||
* @returns The numeric size of the file being read.
|
||||
* @warning The real size may not fit in a 32 bits field and may
|
||||
* be truncated.
|
||||
* @see ssh_scp_request_get_size64()
|
||||
*/
|
||||
uint64_t ssh_scp_request_get_size(ssh_scp scp){
|
||||
size_t ssh_scp_request_get_size(ssh_scp scp){
|
||||
if(scp==NULL)
|
||||
return 0;
|
||||
return scp->filelen;
|
||||
}
|
||||
|
||||
/** @brief Get the size of the file being pushed from the other party.
|
||||
*
|
||||
* @returns The numeric size of the file being read.
|
||||
*/
|
||||
uint64_t ssh_scp_request_get_size64(ssh_scp scp){
|
||||
if(scp==NULL)
|
||||
return 0;
|
||||
return scp->filelen;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user