From 4442e0e26206a1242a0a9268de5e2731c439e34e Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Sun, 12 Nov 2006 00:14:55 +0000 Subject: good work tonight. Made documentation for authentication, channels, buffers, errors git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@80 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/error.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'libssh/error.c') diff --git a/libssh/error.c b/libssh/error.c index 78a7ea12..07169836 100644 --- a/libssh/error.c +++ b/libssh/error.c @@ -23,6 +23,13 @@ MA 02111-1307, USA. */ #include #include #include "libssh/priv.h" +/** defgroup ssh_error + * \brief error handling + */ + +/** \addtogroup ssh_error + * @{ + */ static int verbosity; @@ -36,11 +43,24 @@ void ssh_set_error(void *error,int code,char *descr,...){ err->error_code=code; } +/** \brief retrieve an error text message + * \param error the ssh session pointer + * \return a static string describing the error + */ char *ssh_get_error(void *error){ struct error_struct *err=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 + */ int ssh_get_error_code(void *error){ struct error_struct *err=error; return err->error_code; @@ -57,3 +77,5 @@ void ssh_say(int priority, char *format,...){ void ssh_set_verbosity(int num){ verbosity=num; } + +/** @} */ -- cgit