[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] tcp_enqueue problem, using socket:
From: |
Jonathan Larmour |
Subject: |
Re: [lwip-users] tcp_enqueue problem, using socket: |
Date: |
Wed, 19 Mar 2008 15:39:30 +0000 |
User-agent: |
Thunderbird 1.5.0.12 (X11/20070530) |
Piero 74 wrote:
> } else {
> /* if ERR_MEM, we wait for sent_tcp or poll_tcp to be
> called <--------- wrong comment??? ERR_CONN
> instead ERR_MEM
> on other errors we don't try writing any more */
> conn->err = err;
> write_finished = 1;
> }
>
> if (write_finished) {
> /* everything was written: set back connection state
> and back to application task */
>
> ....
>
> first, i suppose there is a wrong comment (see above)
> second, i propose a patch (but i'm not sure);
> if tcp_enqueue returned ERR_MEM, instead of try tcp_output anyway, exit
> using
>
> conn->err = err;
> write_finished = 1;
>
> what do you think???
The comment could be better positioned. The bit:
/* if ERR_MEM, we wait for sent_tcp or poll_tcp to be called
applies to the previous block.
The bit:
on other errors we don't try writing any more */
applies to the block the comment is presently in.
If tcp_enqueue returns ERR_MEM, the present code is correct - it is not a
fatal error, it just means that it should be retried and the . The netconn
layer will do this as a result of its sent_tcp() and poll_tcp() callbacks.
The calling thread will only be woken up when the data really is sent, or
there _is_ a fatal error.
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
** Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv> **
** April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------ Opinions==mine
- RE: [lwip-users] tcp_enqueue problem, using socket:, (continued)
- RE: [lwip-users] tcp_enqueue problem, using socket:, Bill Auerbach, 2008/03/18
- Re: [lwip-users] tcp_enqueue problem, using socket:, Jonathan Larmour, 2008/03/18
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/19
- Re: [lwip-users] tcp_enqueue problem, using socket:, Jonathan Larmour, 2008/03/19
- RE: [lwip-users] tcp_enqueue problem, using socket:, Bill Auerbach, 2008/03/19
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/19
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/19
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/19
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/19
- RE: [lwip-users] tcp_enqueue problem, using socket:, Bill Auerbach, 2008/03/19
- Re: [lwip-users] tcp_enqueue problem, using socket:,
Jonathan Larmour <=
- Re: [lwip-users] tcp_enqueue problem, using socket:, address@hidden, 2008/03/19
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/20
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/20
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/20
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/20
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/20
- Re: [lwip-users] tcp_enqueue problem, using socket:, Jonathan Larmour, 2008/03/20
- Re: [lwip-users] tcp_enqueue problem, using socket:, Jonathan Larmour, 2008/03/20
- Re: [lwip-users] tcp_enqueue problem, using socket:, Piero 74, 2008/03/20
- Re: [lwip-users] tcp_enqueue problem, using socket:, Jonathan Larmour, 2008/03/20