X-Git-Url: https://hackdaworld.org/gitweb/?p=my-code%2Fivac.git;a=blobdiff_plain;f=stream.c;h=834bf4784dfce47f30c9ae858388729b8f862513;hp=da6cc47a1f0eb92ad5e110ca576c6156b7f0a8c4;hb=fa6a332e18a1ed735e380d1d2081f5778009d6ab;hpb=3cc99313fc75043c07720bf64e5ac76496057864 diff --git a/stream.c b/stream.c index da6cc47..834bf47 100644 --- a/stream.c +++ b/stream.c @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) { while(read_bytes>0) { unsigned char buf[1000]; read_bytes=read(0,buf,sizeof(buf)); - send_bytes=send(send_fd,buf,sizeof(buf),0); + send_bytes=send(send_fd,buf,read_bytes,0); } close(send_fd);