Format ssh_get_error_code().

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@722 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-05-05 07:29:36 +00:00
parent 53a24a4f78
commit 03c40ac79f

View File

@@ -61,9 +61,9 @@ void ssh_set_error(void *error, int code, const char *descr, ...) {
} }
/** /**
* @brief Retrieve an error text message. * @brief Retrieve the error text message from the last error.
* *
* @param error The ssh session pointer. * @param error The SSH session pointer.
* *
* @return A static string describing the error. * @return A static string describing the error.
*/ */
@@ -73,18 +73,25 @@ const char *ssh_get_error(void *error) {
return err->error_buffer; return err->error_buffer;
} }
/** \brief retrieve the error code from the last /**
* error * @brief Retrieve the error code from the last error.
* \param error the ssh session pointer *
* \return SSH_NO_ERROR no error occured\n * @param error The SSH session pointer.
* SSH_REQUEST_DENIED The last request was denied but situation *
* is recoverable\n * \return SSH_NO_ERROR No error occured\n
* SSH_FATAL A fatal error occured. this could be an unexpected disconnection\n * SSH_REQUEST_DENIED The last request was denied but situation is
* Other error codes are internal but can be considered same than SSH_FATAL * recoverable\n
* SSH_FATAL A fatal error occured. This could be an unexpected
* disconnection\n
*
* \nOther error codes are internal but can be considered same than
* SSH_FATAL.
*/ */
int ssh_get_error_code(void *error) { int ssh_get_error_code(void *error) {
struct error_struct *err = error; struct error_struct *err = error;
return err->error_code; return err->error_code;
} }
/** @} */ /** @} */