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

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

From: may nothing <>
Date: Wed, 13 Oct 2010 14:05:55 +0100 (BST)

>> How ?
How to provoke the whole thing to output any debug information. The point is
that whatever I set 'libssh2_session_last_errno()' or 'libssh2_trace()' I never
get any output.

>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);
Ok, I'd tried that, but still I don't get any debug lines. As far as I got this
from the documentation, the libssh2_trace doesn't retrun anything but writes
all its output to stderr ...
I also double checked the config.log of the libssh2-1.2.8 (devel version) and I
can asure you it definitely got build with --enable-debug.

Received on 2010-10-13