Building the libssh2 and including a script to build it as UB
[printdrop.git] / libssh2 / share / man / man3 / libssh2_session_last_error.3
1 .\" $Id: libssh2_session_last_error.3,v 1.1 2007/06/13 23:02:08 jehousley Exp $
2 .\"
3 .TH libssh2_session_last_error 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
4 .SH NAME
5 libssh2_session_last_error - get the most recent error
6 .SH SYNOPSIS
7 #include <libssh2.h>
8
9 int
10 libssh2_session_last_error(LIBSSH2_SESSION *session, char **errmsg, int *errmsg_len, int want_buf);
11
12 .SH DESCRIPTION
13 \fIsession\fP - Session instance as returned by
14 .BR libssh2_session_init(3)
15
16 \fIerrmsg\fP - If not NULL, is populated by reference with the human
17 readable form of the most recent error message.
18
19 \fIerrmsg_len\fP - If not NULL, is populated by reference with the length
20 of errmsg. (The string is NUL-terminated, so the length is only useful as
21 an optimization, to avoid calling strlen.)
22
23 \fIwant_buf\fP - If set to a non-zero value, "ownership" of the errmsg
24 buffer will be given to the calling scope. If necessary, the errmsg buffer
25 will be duplicated.
26
27 Determine the most recent error condition and its cause.
28
29 .SH RETURN VALUE
30 Numeric error code corresponding to the the Error Code constants.
31
32 .SH SEE ALSO
33 .BR libssh2_session_last_errno(3)