8 Commits

Author SHA1 Message Date
Daniel Stenberg
d26a330483 Carlo Bramini's fixes for the nonblocking examples for msys/mingw 2008-09-30 08:55:35 +00:00
Dan Fandrich
c4630d1ffb Removed unnecessary casts and added const where necessary. 2007-08-09 01:10:11 +00:00
Daniel Stenberg
68c86e2c4c The examples no longer have an include path pointing to the private source dir
but instead uses its own config.h file, that now is included first to make
large file magic have an effect.
2007-07-31 11:00:29 +00:00
Daniel Stenberg
accd865aff converted to 4-level space indents, no trailing whitespace 2007-07-14 21:24:38 +00:00
Daniel Stenberg
e0254f3936 removed compiler warnings, narrowed some source lines, killed trailing
whitespace
2007-07-14 20:54:47 +00:00
James Housley
530e57d4ac Gavrie Philipson sumitted a patch to get the actual text of the error
on scp upload.
2007-07-05 11:08:17 +00:00
James Housley
cf8f4d1818 To simplify the user's error interface always use LIBSSH2_ERROR_EAGAIN.
LIBSSH2CHANNEL_EAGAIN and LIBSSH2SFTP_EAGAIN are still valid, but are
defined as LIBSSH2_ERROR_EAGAIN.
2007-06-08 13:33:08 +00:00
James Housley
4b8db8c1ab Modify the code to truely support non-blocking. Propogate the EAGAIN error
all the way up to the user interface.  All code modules bug sftp.c have
been completed.

Functions that return an "int", or similar return LIBSSH2CHANNEL_EAGAIN to
indicate some part of the call would block, in non-blocking mode.

Functions that return a structure, like "LIBSSH2_CHANNEL *", return NULL
and set the libssh2 error.  The error can be obtained with either
libssh2_session_last_error() or libssh2_session_last_errno().  Either of
these will return the error code of LIBSSH2_ERROR_EAGAIN if the
call would block, in non-blocking mode.

The current state of a function and some variable are keep in the
structures so that on the next call the operation that would block can
be retried again with the same data.
2007-06-06 12:34:06 +00:00