summaryrefslogtreecommitdiffstats
path: root/src/scp.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2011-09-15 14:22:32 +0300
committerAris Adamantiadis <aris@0xbadc0de.be>2011-09-18 20:34:15 +0200
commit8f1161f64968b6df250e0b3f3b0f952ccdcf85ad (patch)
tree9529187dba61939dbdef1db73df19842027b5133 /src/scp.c
parent2cc95e1e088553a94b0a8e07c458b1bc0a60d9b1 (diff)
downloadlibssh-8f1161f64968b6df250e0b3f3b0f952ccdcf85ad.tar.gz
libssh-8f1161f64968b6df250e0b3f3b0f952ccdcf85ad.tar.xz
libssh-8f1161f64968b6df250e0b3f3b0f952ccdcf85ad.zip
scp: introduce a 64bits getter to respect ABI
Diffstat (limited to 'src/scp.c')
-rw-r--r--src/scp.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/scp.c b/src/scp.c
index e903775..ac53345 100644
--- a/src/scp.c
+++ b/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;