From b0778ca1691389996da034250fa33f73a9827bd0 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 24 Apr 2009 09:52:06 +0000 Subject: [PATCH] Use a negative value for SSH_AGAIN. This is needed for function which return the length read for example. If we read only one byte then 1 would be returned and some function may think that it has to read again. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@603 7dcaeef0-15fb-0310-b436-a5af3365683c --- include/libssh/libssh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 205efa5c..ad3b8b1c 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -149,7 +149,7 @@ typedef int socket_t; /* error return codes */ #define SSH_OK 0 /* No error */ #define SSH_ERROR -1 /* error of some kind */ -#define SSH_AGAIN 1 /* the nonblocking call must be repeated */ +#define SSH_AGAIN -2 /* the nonblocking call must be repeated */ const char *ssh_get_error(void *error); int ssh_get_error_code(void *error);