Commits

Alexandru Moșoi committed 7a4543c

Improved test/tcp-large.c a little.

Comments (0)

Files changed (1)

         tcp_listen(1234, &client_ip);
 
         while (recv < BUFFER_SIZE) {
-                ret = tcp_read(buffer + recv, BUFFER_SIZE);
+                char small[128];
+                ret = tcp_read(small, sizeof(small));
                 assert(ret > 0);
+                memcpy(buffer + recv, small, ret);
                 recv += ret;
         }
         assert(memcmp(buffer, message, BUFFER_SIZE) == 0);