Archive Index
This month's Index
|
Subject: Re: [libssh2] #162: libssh2_userauth_password() returns undocument value
Re: [libssh2] #162: libssh2_userauth_password() returns undocument value
From: Dave McCaldon <davem_at_intersystems.com>
Date: Wed, 24 Feb 2010 10:35:36 -0500
On Feb 23, 2010, at 10:02 PM, libssh2 Trac wrote:
> #162: libssh2_userauth_password() returns undocument value
Looking at userauth.c, all of the functions use libssh2_error() to store the error, but in fact return -1 on error. The docs for libssh2_userauth_password_ex() are actually not that clear about what it should return. It says:
"Return 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se."
And then lists possible error codes -- this implies that it returns these error codes, but in fact it'll only ever return -1 or LIBSSH2_ERROR_EAGAIN.
So the question is, is this a documentation issue, or should these functions really be returning the error code -- as is being discussed in the libssh2_error() thread that's going on right now.
Thanks.
_______________________________________________
|