/* Validate the secondary server socket. */
if ((bsd_socket_ptr -> nx_bsd_socket_union_id).nx_bsd_socket_secondary_socket_id >= NX_BSD_MAX_SOCKETS)
{
/* This secondary socket is not available yet. This could happen if the
previous accept call fails to allocate a new secondary socket. */
ret = nx_bsd_tcp_create_listen_socket(sockID, 0);
if(ret < 0)
{
/* Failed to allocate a secondary socket, release the protection mutex. */
tx_mutex_put(nx_bsd_protection_ptr);
/* Errno is already set inside nx_bsd_tcp_create_listen_socket. Therefore
there is no need to set errno here. */
/* Return an error. */
NX_BSD_ERROR(NX_SOC_ERROR, __LINE__);
return(NX_SOC_ERROR);
}
}