Subject: Re: sftp error - LIBSSH2_ERROR_SFTP_PROTOCOL

Re: sftp error - LIBSSH2_ERROR_SFTP_PROTOCOL

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 6 May 2010 13:36:45 +0200 (CEST)

On Wed, 5 May 2010, Phillip Wu wrote:

> 1) Is it true to say that LIBSSH2_ERROR_SFTP_PROTOCOL is not really an error
> as such and I should always call libssh2_sftp_last_error when ever I
> get  LIBSSH2_ERROR_SFTP_PROTOCOL ?

It really depends on what you're trying to find out. The
LIBSSH2_ERROR_SFTP_PROTOCOL error means that libssh2 stopped because there was
an error on SFTP level.

libssh2_sftp_last_error() is then your friend to extract the latest error that
libssh2 received over SFTP.

> 2) Where can I get a table of the codes returned by libssh2_sftp_last_error 
> and their meanings?

The SFTP errors are straight from the SFTP protocol and are present in
libssh2_sftp.h with the LIBSSH2_FX_ prefix. See line 171 and onwards.

-- 
  / daniel.haxx.se

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-05-06