hello everyone! I think there is a bug about libssh2_sftp_tell64() ,it's return value is always smaller than the right place.
I think sftp_read() has forget to adjust the offset: if(filep->data_left) { /* data left from previous call */ size_t copy = MIN(buffer_size, filep->data_left); memcpy(buffer, &filep->data[ filep->data_len - filep->data_left], copy); total_read += copy; filep->data_left -= copy; /* adjust the offset */ filep->offset += copy; if(filep->data_left) return total_read; LIBSSH2_FREE(session, filep->data); filep->data = NULL; } /* return when data_left == buffer_size */ if (total_read == buffer_size) return total_read;
_______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel