lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] tcp_enqueue return value


From: Paul C
Subject: [lwip-users] tcp_enqueue return value
Date: Tue, 14 Dec 2004 16:24:07 +1030

Hi All,

I think that there could be an issue with tcp_enqueue().
It is possible for the queue to grow to TCP_SND_QUEUELEN in
which case the function returns ERR_MEM;

When tcp_enqueue is called from tcp_in it is followed by tcp_output()
without checking the return value of tcp_enqueue().

In tcp.c the return value of tcp_enqueue() == ERR_OK is checked before
calling
tcp_output. So the ERR_MEM prevents the output of the tcp data.

tcp_enqueue is also called from tcp_send_ctrl() which is used in
tcp_close.
In tcp_close the ERR_MEM return value prevents the output of the tcp
data.

So, what should really happen when the tcp data is queued to the max?
Should tcp_enqueue do a tcp_output if the queue length is maxed out?
Should the ERR_MEM case be handled by the caller which would do a
tcp_output?

Any comments?

thanks

Paul Clarke





reply via email to

[Prev in Thread] Current Thread [Next in Thread]