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:
@ -22,6 +22,10 @@ program.
|
||||
#include <libssh/libssh.h>
|
||||
#include "examples_common.h"
|
||||
|
||||
#ifndef BUF_SIZE
|
||||
#define BUF_SIZE 16384
|
||||
#endif
|
||||
|
||||
static char **sources;
|
||||
static int nsources;
|
||||
static char *destination;
|
||||
@ -257,7 +261,7 @@ static int do_copy(struct location *src, struct location *dest, int recursive) {
|
||||
socket_t fd;
|
||||
struct stat s;
|
||||
int w, r;
|
||||
char buffer[16384];
|
||||
char buffer[BUF_SIZE];
|
||||
size_t total = 0;
|
||||
mode_t mode;
|
||||
char *filename = NULL;
|
||||
|
Reference in New Issue
Block a user