aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-11-07 17:35:24 +0100
committerAris Adamantiadis <aris@0xbadc0de.be>2009-11-07 17:35:24 +0100
commitaf1f4313648887356696e49e1a377119c5512f1a (patch)
treec73aa84dba00c8ee09a92f3c3be570504b3aa666
parent272a4d1e4596a505d2ca7f3631827855a3bd98f1 (diff)
downloadlibssh-af1f4313648887356696e49e1a377119c5512f1a.tar.gz
libssh-af1f4313648887356696e49e1a377119c5512f1a.tar.xz
libssh-af1f4313648887356696e49e1a377119c5512f1a.zip
change buffer size in 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 {