1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-16 08:41:51 +03:00

Make the transfer buffer size configurable

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Change-Id: I5052bac703b5a0c289ca5c28569cadeb54d3d507
This commit is contained in:
Xiang Xiao
2021-05-10 02:00:24 +08:00
committed by Jakub Jelen
parent 14276f0b51
commit dbe504ea0a
11 changed files with 53 additions and 15 deletions

View File

@ -35,6 +35,10 @@ clients must be made or how a client should react.
#include <stdio.h>
#include <poll.h>
#ifndef BUF_SIZE
#define BUF_SIZE 16384
#endif
#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
#ifndef __unused__
@ -349,7 +353,7 @@ my_fd_data_function(UNUSED_PARAM(socket_t fd),
ssh_channel channel = event_fd_data->channel;
ssh_session session;
int len, i, wr;
char buf[16384];
char buf[BUF_SIZE];
int blocking;
if (channel == NULL) {