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.
This commit is contained in:
Alan Carvalho de Assis 2020-02-24 11:35:01 -06:00 committed by Gregory Nutt
parent be3d5ded44
commit d74ca3ab82

View File

@ -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