From d74ca3ab824092222d75c9ead3fc63a4e0765dc5 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Mon, 24 Feb 2020 11:35:01 -0600 Subject: [PATCH] Make the tcp_backlog error message clear The tcp_backlog is used when there is not process running to accept a new connection, but it is limited by the number of allocated backlog containers. The current error message induces the user to believe there is not free memory to allocate a new container, but actually the containers were allocated during the initialization and were available until the last element of the list has been removed to use. --- net/tcp/tcp_backlog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/tcp/tcp_backlog.c b/net/tcp/tcp_backlog.c index e86e2e6774..a7410bbd20 100644 --- a/net/tcp/tcp_backlog.c +++ b/net/tcp/tcp_backlog.c @@ -241,12 +241,12 @@ int tcp_backlogadd(FAR struct tcp_conn_s *conn, FAR struct tcp_conn_s *blconn) bls = conn->backlog; if (bls && blconn) { - /* Allocate a container for the connection from the free list */ + /* Get a container for the connection from the free list */ blc = (FAR struct tcp_blcontainer_s *)sq_remfirst(&bls->bl_free); if (!blc) { - nerr("ERROR: Failed to allocate container\n"); + nerr("ERROR: There are no free containers for TCP BACKLOG!\n"); ret = -ENOMEM; } else