lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] Question about unsent_oversize reset by zero length pcb


From: address@hidden
Subject: Re: [lwip-devel] Question about unsent_oversize reset by zero length pcb in tcp_write()
Date: Wed, 18 Jan 2017 21:11:51 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Axel Lin wrote:
Hi,
tcp_write() allows a pcb with len=0.  (tcp_write_checks() return
ERR_OK if len is 0)
In this case, nothing add to pcb->unsent list and last_unsent->len is
not changed
but pcb->unsent_oversize will be set to 0.
I'm wondering if this is correct or not. Comments?

No, that's not really correct, unless there are flags added (so data length is zero but still a segment is created).
In that case, it's OK to not add anything to the last segment.
I guess the dumb case of calling tcp_write() with len==0 and no flags has just not been thought of... Plus I don't know if it's worth optimizing for this...

Simon



reply via email to

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