1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-11-02 10:53:16 +03:00

removed libssh2_error()'s forth argument

libssh2_error() no longer allocates a string and only accepts a const
error string. I also made a lot of functions use the construct of
return libssh2_error(...) instead of having one call to
libssh2_error() and then a separate return call. In several of those
cases I then also changed the former -1 return code to a more
detailed one - something that I think will not change behaviors
anywhere but it's worth keeping an eye open for any such.
This commit is contained in:
Daniel Stenberg
2010-03-03 23:04:05 +01:00
parent d377c3065a
commit d4a768af4e
15 changed files with 693 additions and 980 deletions

View File

@@ -731,8 +731,6 @@ struct _LIBSSH2_SESSION
/* Error tracking */
const char *err_msg;
unsigned long err_msglen;
int err_should_free;
int err_code;
/* struct members for packet-level reading */
@@ -1036,8 +1034,7 @@ _libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format, ...)
#endif
#endif
int libssh2_error(LIBSSH2_SESSION* session, int errcode, const char* errmsg,
int should_free);
int libssh2_error(LIBSSH2_SESSION* session, int errcode, const char* errmsg);
#define LIBSSH2_SOCKET_UNKNOWN 1
#define LIBSSH2_SOCKET_CONNECTED 0