Subject: [PATCH] sftp_read:adjust the file offset pointer

[PATCH] sftp_read:adjust the file offset pointer

From: liuzl <xieepp_at_gmail.com>
Date: Thu, 25 Aug 2011 16:08:04 +0800

libssh2_sftp_tell64 now tell the right file offset pointer

Signed-off-by: liuzl <xieepp_at_gmail.com>

---
 src/sftp.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/sftp.c b/src/sftp.c
index 0acccd0..76ffaaf 100644
--- a/src/sftp.c
+++ b/src/sftp.c
@@ -1098,6 +1098,7 @@ static ssize_t sftp_read(LIBSSH2_SFTP_HANDLE * handle, char *buffer,
 
         total_read += copy;
         filep->data_left -= copy;
+        filep->offset += copy;
 
         if(filep->data_left)
             return total_read;
-- 
1.7.4.msysgit.0
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-08-25