Subject: Re: libssh2_sftp_seek64 doesn't work

Re: libssh2_sftp_seek64 doesn't work

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 26 Aug 2011 13:31:34 +0200 (CEST)

On Thu, 25 Aug 2011, m odd wrote:

> libssh2_sftp_seek64 should do more work than now, But my code is not very
> correct. am i right?

I believe your code does the right thing and I intend to merge it. Thanks a
lot!

When it flushes the packetlist, there's a risk that there are pending packets
about to arrive for which the corresponding requests now get removed, but
that's not a problem but will only cause some surplus packets to linger around
in the sftp session handle until killed. There's possibly a way to optimize
for how long they linger and when they can be garbage collected.

I think there's also room for improving how to seek forwards that could avoid
discarding all data already read, but that's "just" optimizing.

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-08-26