[PATCH] splice-net: kill the 'bla' and kb_sent restrictions
authorJens Axboe <axboe@suse.de>
Sat, 22 Apr 2006 15:22:20 +0000 (17:22 +0200)
committerJens Axboe <axboe@suse.de>
Sat, 22 Apr 2006 15:22:20 +0000 (17:22 +0200)
splice-net.c

index 1a0b4c43a9c036f706e2210c5a1b2ffc7c7b917f..6f2e818fa9fedade90aaf29287064d02c489581e 100644 (file)
@@ -58,7 +58,6 @@ int main(int argc, char *argv[])
        struct sockaddr_in addr;
        unsigned short port;
        int fd, pfd[2], ffd, ret;
-       int bla = 1;
 
        if (argc < 4) {
                printf("%s: file target port\n", argv[0]);
@@ -101,10 +100,6 @@ int main(int argc, char *argv[])
 
        do {
                ret = splice(ffd, NULL, pfd[1], NULL, SPLICE_SIZE, SPLICE_F_NONBLOCK);
-
-               if (!bla)
-                       printf("spliced %d\n", ret);
-
                if (ret < 0) {
                        if (errno == EAGAIN) {
                                usleep(100);
@@ -125,7 +120,7 @@ int main(int argc, char *argv[])
                                break;
                        ret -= written;
                }
-       } while (kb_sent < 512 * 1024 && bla);
+       } while (1);
 
        show_rate(0);
        close(fd);