www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: Fwd: seek64() docs

Re: Fwd: seek64() docs

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 18 Sep 2013 22:26:54 +0200 (CEST)

On Wed, 18 Sep 2013, Alexander Lamaison wrote:

> "You MUST NOT seek during writing or reading a file with SFTP, as the
> internals use outstanding packets and changing the "file position" during
> transit will results in badness."
>
> Now I'm pretty sure that's not right. At least, it's not as broad a
> restriction as we make it sound. After all, if you're not reading or
> writing the file, why would you be seeking at all.
>
> Perhaps it means during a non-blocking read you must not seek after
> getting an E_AGAIN. from a read/write. Instead you must call the
> read/write again. But that is true of any libssh2 function so why
> call it out here?

I believe that's exactly what that warning is about and yes I agree that we
can probably soften/rephrase that to something better and more helpful.

> Does anyone know what this sentence was really meant to guard against?

I can't recall anything else right now.

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-09-18

the libssh2 team