mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-02 10:53:16 +03:00
channel_read() was changed to _libssh2_channel_read() as lots of
internal code was changed to use that instead of wrongly using libssh2_channel_read_ex(). Some files now need to include channel.h to get this proto. channel_read() calls libssh2_error() properly on transport_read() failures channel_read() was adjusted to not "invent" EAGAIN return code in case the transport_read() didn't return it channel_close() now returns 0 or error code, as documented. Previously it would return number of bytes read in the last read, which was confusing (and useless).
This commit is contained in:
@@ -1048,7 +1048,7 @@ _libssh2_debug(LIBSSH2_SESSION * session, int context, const char *format, ...)
|
||||
session->err_msglen = strlen(errmsg); \
|
||||
session->err_should_free = should_free; \
|
||||
session->err_code = errcode; \
|
||||
_libssh2_debug(session, LIBSSH2_DBG_ERROR, "%d - %s", session->err_code, session->err_msg); \
|
||||
_libssh2_debug(session, LIBSSH2_DBG_ERROR, "%s:%d %d - %s", __func__, __LINE__, session->err_code, session->err_msg); \
|
||||
}
|
||||
|
||||
#else /* ! LIBSSH2DEBUG */
|
||||
|
||||
Reference in New Issue
Block a user