libssh2_banner_set => libssh2_session_banner_get
Marked the old function as deprecated. Added the new name in the correct name space with the same arguments and functionality.
This commit is contained in:
parent
f2c21f6f84
commit
7229d989e7
1
TODO
1
TODO
@ -51,6 +51,7 @@ At next SONAME bump
|
||||
libssh2_poll()
|
||||
libssh2_poll_channel_read()
|
||||
libssh2_session_startup() (libssh2_session_handshake() is the replacement)
|
||||
libssh2_banner_set() (libssh2_session_banner_set() is the repacement)
|
||||
|
||||
* Rename a few function:
|
||||
|
||||
|
@ -93,6 +93,7 @@ dist_man_MANS = \
|
||||
libssh2_scp_send_ex.3 \
|
||||
libssh2_session_abstract.3 \
|
||||
libssh2_session_banner_get.3 \
|
||||
libssh2_session_banner_set.3 \
|
||||
libssh2_session_block_directions.3 \
|
||||
libssh2_session_callback_set.3 \
|
||||
libssh2_session_disconnect.3 \
|
||||
|
@ -8,6 +8,9 @@ int
|
||||
libssh2_banner_set(LIBSSH2_SESSION *session, const char *banner);
|
||||
|
||||
.SH DESCRIPTION
|
||||
This function is \fbDEPRECATED\fP. Use \fIlibssh2_session_banner_set(3)\fP
|
||||
instead!
|
||||
|
||||
\fIsession\fP - Session instance as returned by
|
||||
.BR libssh2_session_init_ex(3)
|
||||
|
||||
@ -17,14 +20,13 @@ Set the banner that will be sent to the remote host when the SSH session is
|
||||
started with
|
||||
.BR libssh2_session_startup(3)
|
||||
This is optional; a banner corresponding to the protocol and libssh2 version will be sent by default.
|
||||
|
||||
.SH RETURN VALUE
|
||||
Return 0 on success or negative on failure. It returns
|
||||
LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
|
||||
LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
|
||||
|
||||
.SH AVAILABILITY
|
||||
Marked as deprecated since 1.4.0
|
||||
.SH ERRORS
|
||||
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
|
||||
|
||||
.SH SEE ALSO
|
||||
.BR libssh2_session_startup(3)
|
||||
.BR libssh2_session_handshake(3)
|
||||
|
@ -13,6 +13,8 @@ the banner each server presents.
|
||||
A pointer to a string or NULL if something failed. The data pointed to will be
|
||||
allocated and associated to the session handle and will be freed by libssh2
|
||||
when \fIlibssh2_session_free(3)\fP is used.
|
||||
.SH AVAILABILITY
|
||||
Added in 1.4.0
|
||||
.SH SEE ALSO
|
||||
.BR libssh2_session_banner_set(3),
|
||||
.BR libssh2_session_handshake(3),
|
||||
|
32
docs/libssh2_session_banner_set.3
Normal file
32
docs/libssh2_session_banner_set.3
Normal file
@ -0,0 +1,32 @@
|
||||
.TH libssh2_session_banner_set 3 "9 Sep 2011" "libssh2 1.4.0" "libssh2 manual"
|
||||
.SH NAME
|
||||
libssh2_session_banner_set - set the SSH prococol banner for the local client
|
||||
.SH SYNOPSIS
|
||||
#include <libssh2.h>
|
||||
|
||||
int
|
||||
libssh2_session_banner_set(LIBSSH2_SESSION *session, const char *banner);
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fIsession\fP - Session instance as returned by
|
||||
.BR libssh2_session_init_ex(3)
|
||||
|
||||
\fIbanner\fP - A pointer to a zero-terminated string holding the user defined
|
||||
banner
|
||||
|
||||
Set the banner that will be sent to the remote host when the SSH session is
|
||||
started with \fIlibssh2_session_startup(3)\fP This is optional; a banner
|
||||
corresponding to the protocol and libssh2 version will be sent by default.
|
||||
.SH RETURN VALUE
|
||||
Returns 0 on success or negative on failure. It returns LIBSSH2_ERROR_EAGAIN
|
||||
when it would otherwise block. While LIBSSH2_ERROR_EAGAIN is a negative
|
||||
number, it isn't really a failure per se.
|
||||
.SH ERRORS
|
||||
\fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
|
||||
.SH AVAILABILITY
|
||||
Added in 1.4.0.
|
||||
|
||||
Before 1.4.0 this function was known as libssh2_banner_set(3)
|
||||
.SH SEE ALSO
|
||||
.BR libssh2_session_handshake(3),
|
||||
.BR libssh2_session_banner_get(3)
|
@ -411,11 +411,11 @@ get_socket_nonblocking(int sockfd)
|
||||
#endif
|
||||
}
|
||||
|
||||
/* libssh2_banner_set
|
||||
* Set the local banner
|
||||
/* libssh2_session_banner_set
|
||||
* Set the local banner to use in the server handshake.
|
||||
*/
|
||||
LIBSSH2_API int
|
||||
libssh2_banner_set(LIBSSH2_SESSION * session, const char *banner)
|
||||
libssh2_session_banner_set(LIBSSH2_SESSION * session, const char *banner)
|
||||
{
|
||||
size_t banner_len = banner ? strlen(banner) : 0;
|
||||
|
||||
@ -446,6 +446,15 @@ libssh2_banner_set(LIBSSH2_SESSION * session, const char *banner)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* libssh2_banner_set
|
||||
* Set the local banner. DEPRECATED VERSION
|
||||
*/
|
||||
LIBSSH2_API int
|
||||
libssh2_banner_set(LIBSSH2_SESSION * session, const char *banner)
|
||||
{
|
||||
return libssh2_session_banner_set(session, banner);
|
||||
}
|
||||
|
||||
/*
|
||||
* libssh2_session_init_ex
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user