aboutsummaryrefslogtreecommitdiff
path: root/examples/sample.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/sample.c')
-rw-r--r--examples/sample.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/sample.c b/examples/sample.c
index d5eec979..d9c6dde6 100644
--- a/examples/sample.c
+++ b/examples/sample.c
@@ -162,7 +162,7 @@ static void sizechanged(void){
static void select_loop(ssh_session session,ssh_channel channel){
fd_set fds;
struct timeval timeout;
- char buffer[10];
+ char buffer[4096];
ssh_buffer readbuf=buffer_new();
ssh_channel channels[2];
int lus;
@@ -189,7 +189,7 @@ static void select_loop(ssh_session session,ssh_channel channel){
if(ret==EINTR)
continue;
if(FD_ISSET(0,&fds)){
- lus=read(0,buffer,10);
+ lus=read(0,buffer,sizeof(buffer));
if(lus)
channel_write(channel,buffer,lus);
else {