Deprecate untested function sftp_server_init

Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
Jakub Jelen
2023-03-23 20:21:00 +01:00
parent 492317efe9
commit 423bb3c8f0
2 changed files with 3 additions and 2 deletions

View File

@@ -883,7 +883,7 @@ LIBSSH_API sftp_session sftp_server_new(ssh_session session, ssh_channel chan);
*
* @return 0 on success, < 0 on error.
*/
LIBSSH_API int sftp_server_init(sftp_session sftp);
SSH_DEPRECATED LIBSSH_API int sftp_server_init(sftp_session sftp);
/**
* @brief Close and deallocate a sftp server session.

View File

@@ -266,13 +266,14 @@ error:
return NULL;
}
/* FIXME Untested. To be @deprecated */
/* @deprecated in favor of sftp_server_new() and callbacks based sftp server */
int sftp_server_init(sftp_session sftp)
{
ssh_session session = sftp->session;
sftp_client_message msg = NULL;
int rc;
/* handles setting the sftp->client_version */
msg = sftp_get_client_message(sftp);
if (msg == NULL) {
return -1;