Subject: Re: Cannot set up sftp connection?

Re: Cannot set up sftp connection?

From: Steven Van Ingelgem <steven_at_vaningelgem.be>
Date: Thu, 2 Jul 2009 11:56:25 +0200

2009/7/2 Daniel Stenberg <daniel_at_haxx.se>

> Is that showing all files?
>

Yes

> ERROR: Would block waiting for status message
>
> [the error i put there via this code]:
>> shutdown:
>> if ( session ) {
>> char *errmsg;
>> int len;
>> libssh2_session_last_error(session, &errmsg, &len, 0);
>> printf( "ERROR: %*s\n", len, errmsg );
>>
>
> That error seems to have been stored previously (as the only time that
> message is used is in sftp_open) and simply wasn't properly cleared
> afterwards. Thus it looks like this app might have worked for you
> non-blocking. You think that might be right?

Ok, the amount of lines (92) are the same as the amount of files on the
server. So it looks like the nonblocking version is working. (but the
blocking one is hanging).
I also use the _ex functions in my tool instead of the normal ones used in
the sample [for example: libssh2_sftp_open_ex <-> libssh2_sftp_opendir,
libssh2_sftp_readdir_ex <-> libssh2_sftp_readdir, libssh2_sftp_close_handle
<-> libssh2_sftp_closedir].

Grtz,
Steven

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2009-07-02