diff --git a/include/libssh/sftp.h b/include/libssh/sftp.h index 767cff76..e210a1be 100644 --- a/include/libssh/sftp.h +++ b/include/libssh/sftp.h @@ -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. diff --git a/src/sftp.c b/src/sftp.c index 90aa8033..ba19f562 100644 --- a/src/sftp.c +++ b/src/sftp.c @@ -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;