From 58aff4495e8643514050be8bc62f164b16b710bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Fri, 25 Sep 2015 01:41:36 +0200 Subject: [PATCH] buffer: expose ssh_buffer_reinit() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabiano FidĂȘncio Reviewed-by: Andreas Schneider --- include/libssh/buffer.h | 1 - include/libssh/libssh.h | 1 + src/buffer.c | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/include/libssh/buffer.h b/include/libssh/buffer.h index a410bc5b..3bdd6753 100644 --- a/include/libssh/buffer.h +++ b/include/libssh/buffer.h @@ -72,7 +72,6 @@ int _ssh_buffer_unpack(struct ssh_buffer_struct *buffer, int ssh_buffer_prepend_data(ssh_buffer buffer, const void *data, uint32_t len); int ssh_buffer_add_buffer(ssh_buffer buffer, ssh_buffer source); -int ssh_buffer_reinit(ssh_buffer buffer); /* ssh_buffer_get_rest returns a pointer to the current position into the buffer */ void *ssh_buffer_get(ssh_buffer buffer); diff --git a/include/libssh/libssh.h b/include/libssh/libssh.h index 11e0f4fc..635e015f 100644 --- a/include/libssh/libssh.h +++ b/include/libssh/libssh.h @@ -681,6 +681,7 @@ LIBSSH_API const char* ssh_get_hmac_out(ssh_session session); LIBSSH_API ssh_buffer ssh_buffer_new(void); LIBSSH_API void ssh_buffer_free(ssh_buffer buffer); +LIBSSH_API int ssh_buffer_reinit(ssh_buffer buffer); LIBSSH_API uint32_t ssh_buffer_get_len(ssh_buffer buffer); #ifndef LIBSSH_LEGACY_0_4 diff --git a/src/buffer.c b/src/buffer.c index 7c485e75..d3eecb72 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -184,8 +184,6 @@ static void buffer_shift(ssh_buffer buffer){ } /** - * @internal - * * @brief Reinitialize a SSH buffer. * * @param[in] buffer The buffer to reinitialize.