aboutsummaryrefslogtreecommitdiff
path: root/libssh/error.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2006-11-12 00:14:55 +0000
committerAris Adamantiadis <aris@0xbadc0de.be>2006-11-12 00:14:55 +0000
commit4442e0e26206a1242a0a9268de5e2731c439e34e (patch)
tree954efeb92285b02a7b4a946bdc802c7bf894bebb /libssh/error.c
parentd101fb4329f4313f1b930e9876166df3304e672a (diff)
downloadlibssh-4442e0e26206a1242a0a9268de5e2731c439e34e.tar.gz
libssh-4442e0e26206a1242a0a9268de5e2731c439e34e.tar.xz
libssh-4442e0e26206a1242a0a9268de5e2731c439e34e.zip
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
Diffstat (limited to 'libssh/error.c')
-rw-r--r--libssh/error.c22
1 files changed, 22 insertions, 0 deletions
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 <stdio.h>
#include <stdarg.h>
#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;
}
+
+/** @} */