sftp: Remove internal function from sftp.h

Those are not marked as LIBSSH_API so not part of the public API and the
symbols aren't exported!

Fixes T188

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
Andreas Schneider
2019-11-08 11:23:59 +01:00
parent 6cef3e10bf
commit db4345fb36
4 changed files with 44 additions and 12 deletions

View File

@@ -44,6 +44,7 @@
#include "libssh/priv.h"
#include "libssh/ssh2.h"
#include "libssh/sftp.h"
#include "libssh/sftp_priv.h"
#include "libssh/buffer.h"
#include "libssh/channels.h"
#include "libssh/session.h"
@@ -623,7 +624,8 @@ static int sftp_read_and_dispatch(sftp_session sftp)
return 0;
}
void sftp_packet_free(sftp_packet packet) {
void sftp_packet_free(sftp_packet packet)
{
if (packet == NULL) {
return;
}
@@ -1448,8 +1450,8 @@ static sftp_attributes sftp_parse_attr_3(sftp_session sftp, ssh_buffer buf,
return NULL;
}
/* FIXME is this really needed as a public function? */
int buffer_add_attributes(ssh_buffer buffer, sftp_attributes attr) {
int buffer_add_attributes(ssh_buffer buffer, sftp_attributes attr)
{
uint32_t flags = (attr ? attr->flags : 0);
int rc;
@@ -1494,8 +1496,10 @@ int buffer_add_attributes(ssh_buffer buffer, sftp_attributes attr) {
}
sftp_attributes sftp_parse_attr(sftp_session session, ssh_buffer buf,
int expectname) {
sftp_attributes sftp_parse_attr(sftp_session session,
ssh_buffer buf,
int expectname)
{
switch(session->version) {
case 4:
return sftp_parse_attr_4(session, buf, expectname);

View File

@@ -32,11 +32,14 @@
#include "libssh/libssh.h"
#include "libssh/sftp.h"
#include "libssh/sftp_priv.h"
#include "libssh/ssh2.h"
#include "libssh/priv.h"
#include "libssh/buffer.h"
#include "libssh/misc.h"
#define SFTP_HANDLES 256
sftp_client_message sftp_get_client_message(sftp_session sftp) {
ssh_session session = sftp->session;
sftp_packet packet;