Yes, you probably need extra parens around (pcb)->snd_buf > 0.

 

I don't even know if it's valid and I'm nowhere near as knowledgeable about
lwIP as the others are here.  I set TCP_SND_QUEUELEN to 256 but I can see in
memory limited applications that this isn't ideal.

 

Look at do_writemore - this is where it won't write more than tcp_sndbuf.
This looks like the same location to test for TCP_SND_QUEUELEN and not write
more if that has been reached.  I can test this in my program, but it's
without an OS (no netconns or sockets, but I have the same tcp_sndbuf test
which is required in the tcp_sent callback).

 

Bill

 

  _____  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf
Of Piero 74
Sent: Wednesday, March 19, 2008 9:41 AM
To: Mailing list for lwIP users
Subject: Re: [lwip-users] tcp_enqueue problem, using socket:

 

i didn't understand this suggest:

#define tcp_accept_data(pcb) ((pcb)->snd_buf > 0 * (((pcb)->queuelen <
TCP_SND_QUEUELEN))

0 * (((pcb)->queuelen < TCP_SND_QUEUELEN) is always 0, right???

where have i to add this macro??



_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to