fixed a bug. tcp_listener_create was called incorrectly by microtcp_open

This commit is contained in:
cozis
2023-05-22 23:57:34 +02:00
parent 04ce79bcf0
commit 59e6238348
8 changed files with 207 additions and 11 deletions
+2 -2
View File
@@ -826,8 +826,8 @@ microtcp_socket_t *microtcp_open(microtcp_t *mtcp, uint16_t port,
errcode2 = MICROTCP_ERRCODE_SOCKETLIMIT;
goto unlock_and_exit; // Socket limit reached
}
tcp_listener_t *listener = tcp_listener_create(&mtcp->tcp_state, port, socket, false, ready_to_accept);
tcp_listener_t *listener = tcp_listener_create(&mtcp->tcp_state, port, false, socket, ready_to_accept);
if (listener == NULL) {
// FIXME: This error code should be more specific,
// but the TCP module isn't stable yet