1 .\" $Id: libssh2_session_last_error.3,v 1.1 2007/06/13 23:02:08 jehousley Exp $
3 .TH libssh2_session_last_error 3 "1 Jun 2007" "libssh2 0.15" "libssh2 manual"
5 libssh2_session_last_error - get the most recent error
10 libssh2_session_last_error(LIBSSH2_SESSION *session, char **errmsg, int *errmsg_len, int want_buf);
13 \fIsession\fP - Session instance as returned by
14 .BR libssh2_session_init(3)
16 \fIerrmsg\fP - If not NULL, is populated by reference with the human
17 readable form of the most recent error message.
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.)
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
27 Determine the most recent error condition and its cause.
30 Numeric error code corresponding to the the Error Code constants.
33 .BR libssh2_session_last_errno(3)