]> git.meshlink.io Git - utcp/blobdiff - test.c
Handle retransmissions in CLOSE_WAIT, CLOSING and LAST_ACK states.
[utcp] / test.c
diff --git a/test.c b/test.c
index fcf0c794883e1f4e6fe06d6700c9a158e629f1f6..b5d64a3eb3ba698c8c763010131fbd386df5fbd0 100644 (file)
--- a/test.c
+++ b/test.c
@@ -106,7 +106,7 @@ int main(int argc, char *argv[]) {
        struct timeval timeout = utcp_timeout(u);
 
        while(dir) {
-               size_t max = utcp_get_sndbuf_free(c);
+               size_t max = c ? utcp_get_sndbuf_free(c) : 0;
                if(max > sizeof buf)
                        max = sizeof buf;