Subject: Re: AW: libssh2_sftp_init ... I don't get it.

Re: AW: libssh2_sftp_init ... I don't get it.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 12 Oct 2010 22:49:09 +0200 (CEST)

On Tue, 12 Oct 2010, may nothing wrote:

> How ?

How what?

Please don't use top-posting in mailing list discussions. It breaks the
quoting, it makes reading the mails hard and old grumpy people like me only
get annoyed.

> sftp_session = libssh2_sftp_init(session);
>
> if (!sftp_session)
> {
> fprintf(stderr, "Unable to init SFTP session\n");
> int errLast = libssh2_session_last_errno(sftp_session);
> printf("error is: ",errLast);
> libssh2_trace(session, 0);

I don't know why libssh2_session_last_errno() returns zero (I assume you mean
that by "nothing"), but perhaps the full trace will help us...

libssh2_trace should be called _before_ libssh2_sftp_init, and you should of
course set something _else_ than 0 as a flag. For simplicity I suggest you
call it like:

    libssh2_trace(session, ~0);

-- 
  / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-10-12