aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-02-02 16:49:05 +0000
committerAndreas Schneider <mail@cynapses.org>2009-02-02 16:49:05 +0000
commit9414b53befc24d462f5e5d00eea112a7b01806a7 (patch)
tree3f639543ab185e774b63b98447a878f19fddd406
parent5f58fc773ca9a0eb840654acd7896bb294ad4635 (diff)
downloadlibssh-9414b53befc24d462f5e5d00eea112a7b01806a7.tar.gz
libssh-9414b53befc24d462f5e5d00eea112a7b01806a7.tar.xz
libssh-9414b53befc24d462f5e5d00eea112a7b01806a7.zip
Return count if the write was successful.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@219 7dcaeef0-15fb-0310-b436-a5af3365683c
-rw-r--r--libssh/sftp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libssh/sftp.c b/libssh/sftp.c
index 03abddc2..a08155c2 100644
--- a/libssh/sftp.c
+++ b/libssh/sftp.c
@@ -1145,7 +1145,6 @@ ssize_t sftp_write(SFTP_FILE *file, const void *buf, size_t count){
STRING *datastring;
SFTP_SESSION *sftp=file->sftp;
int id;
- int err=0;
BUFFER *buffer;
buffer=buffer_new();
id=sftp_get_new_id(file->sftp);
@@ -1178,7 +1177,7 @@ ssize_t sftp_write(SFTP_FILE *file, const void *buf, size_t count){
case SSH_FX_OK:
file->offset += count;
status_msg_free(status);
- return err ? err : count;
+ return count;
default:
break;
}