diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-05-05 07:29:36 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-05-05 07:29:36 +0000 |
commit | 03c40ac79f1fddafb2e9b41728922028543e75fc (patch) | |
tree | e3646dd3e14900e15fc747b9694f5d75ea2a237a /libssh/error.c | |
parent | 53a24a4f783fa01a9d91b4b5c587de042586afb3 (diff) | |
download | libssh-03c40ac79f1fddafb2e9b41728922028543e75fc.tar.gz libssh-03c40ac79f1fddafb2e9b41728922028543e75fc.tar.xz libssh-03c40ac79f1fddafb2e9b41728922028543e75fc.zip |
Format ssh_get_error_code().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@722 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/error.c')
-rw-r--r-- | libssh/error.c | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/libssh/error.c b/libssh/error.c index b55640e..6eb1077 100644 --- a/libssh/error.c +++ b/libssh/error.c @@ -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. */ @@ -73,18 +73,25 @@ const char *ssh_get_error(void *error) { return err->error_buffer; } -/** \brief retrieve the error code from the last - * error - * \param error the ssh session pointer - * \return SSH_NO_ERROR no error occured\n - * SSH_REQUEST_DENIED The last request was denied but situation - * is recoverable\n - * SSH_FATAL A fatal error occured. this could be an unexpected disconnection\n - * Other error codes are internal but can be considered same than SSH_FATAL +/** + * @brief Retrieve the error code from the last error. + * + * @param error The SSH session pointer. + * + * \return SSH_NO_ERROR No error occured\n + * SSH_REQUEST_DENIED The last request was denied but situation is + * 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){ - struct error_struct *err=error; - return err->error_code; +int ssh_get_error_code(void *error) { + struct error_struct *err = error; + + return err->error_code; } /** @} */ + |