Here is a little patch, I am not sure it's 100% ok, it does not resolve the problem entirely, it only handles LIBSSH2_ERROR_SOCKET_DISCONNECT. Maybe just returning "rc" would be better.
--------- Original Message ---------Subject: Re: libssh2_userauth_password return value
From: Peter Stuge <peter_at_stuge.se>
Date: 4/17/13 3:07 pm
To: libssh2-devel_at_cool.haxx.se
cosmin_at_5ivestars.net wrote:
> } else if (rc) {
> session->userauth_pswd_state = libssh2_NB_state_idle;
> return _libssh2_error(session, LIBSSH2_ERROR_TIMEOUT,
> "Would block waiting");
> }
>
> I think it should return the actual error from the transport layer
> and not a "general" LIBSSH2_ERROR_TIMEOUT error.
Could you send a patch to fix that? Thanks.
//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel