1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-07 08:02:56 +03:00

1 - new public function libssh2_trace() that enables tracing/debug output on

various stuff if libssh2 was built with debug. If built without debug, the
 function does nothing.
2 - configure --enable-debug is now enough to build a debug version (including
picky compiler options)
3 - internally, we no longer need/use #ifdef/#endif around all uses of the
_libssh2_debug() function/macro.

The scp.c example is the first application to test this new debug logging.
This commit is contained in:
Daniel Stenberg
2007-02-02 23:23:36 +00:00
parent 6304383c91
commit 4f1cfb20a9
14 changed files with 158 additions and 364 deletions

View File

@@ -417,6 +417,20 @@ LIBSSH2_API LIBSSH2_CHANNEL *libssh2_scp_send_ex(LIBSSH2_SESSION *session, const
LIBSSH2_API int libssh2_base64_decode(LIBSSH2_SESSION *session, char **dest, unsigned int *dest_len, char *src, unsigned int src_len);
/* NOTE NOTE NOTE
libssh2_trace() has no function in builds that aren't built with debug
enabled
*/
LIBSSH2_API int libssh2_trace(LIBSSH2_SESSION *session, int bitmask);
#define LIBSSH2_TRACE_TRANS (1<<1)
#define LIBSSH2_TRACE_KEX (1<<2)
#define LIBSSH2_TRACE_AUTH (1<<3)
#define LIBSSH2_TRACE_CONN (1<<4)
#define LIBSSH2_TRACE_SCP (1<<5)
#define LIBSSH2_TRACE_SFTP (1<<6)
#define LIBSSH2_TRACE_ERROR (1<<7)
#define LIBSSH2_TRACE_PUBLICKEY (1<<8)
#ifdef __cplusplus
} /* extern "C" */
#endif