lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #6969] Review usage of conn->err in netconn layer


From: Simon Goldschmidt
Subject: [lwip-devel] [task #6969] Review usage of conn->err in netconn layer
Date: Sat, 02 Jun 2007 11:11:13 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

Follow-up Comment #2, task #6969 (project lwip):

> - we also can make a "filter) for "fatal errors" like this:
> #define ERR_IS_FATAL(e) (e>ERR_BUF)
> and change the several checkings in api_lib/api_msg by :
> if (ERR_IS_FATAL(conn->err)) ...

I think something like that is definitively the best solution. 
We should think about what we want to protect by not allowing an operation if
conn->err != ERR_OK. The only protection I see is needed is if a connection is
reset (e.g. tcp_err is called or something) and/or the pcb is definitively not
in a state to accept calls.

Therefore, blocking errors should be ERR_ABRT, ERR_RST and ERR_CLSD which are
indications that a connection has been closed. (Or can you re-open a closed
TCP connection???)

I see no reason an application shouldn't send more and more data e.g. over a
UDP socket if that socket's netif is down. It's up to the programmer to cope
with that.


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?6969>

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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