1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

change buffer size in sample.c

This commit is contained in:
Aris Adamantiadis
2009-11-07 17:35:24 +01:00
parent 272a4d1e45
commit af1f431364

View File

@ -162,7 +162,7 @@ static void sizechanged(void){
static void select_loop(ssh_session session,ssh_channel channel){ static void select_loop(ssh_session session,ssh_channel channel){
fd_set fds; fd_set fds;
struct timeval timeout; struct timeval timeout;
char buffer[10]; char buffer[4096];
ssh_buffer readbuf=buffer_new(); ssh_buffer readbuf=buffer_new();
ssh_channel channels[2]; ssh_channel channels[2];
int lus; int lus;
@ -189,7 +189,7 @@ static void select_loop(ssh_session session,ssh_channel channel){
if(ret==EINTR) if(ret==EINTR)
continue; continue;
if(FD_ISSET(0,&fds)){ if(FD_ISSET(0,&fds)){
lus=read(0,buffer,10); lus=read(0,buffer,sizeof(buffer));
if(lus) if(lus)
channel_write(channel,buffer,lus); channel_write(channel,buffer,lus);
else { else {