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: Frédéric Bernon
Subject: [lwip-devel] [task #6969] Review usage of conn->err in netconn layer
Date: Sat, 02 Jun 2007 10:51:28 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3

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

For netconn_peer and netconn_addr, I propose to simply replace :

return (conn->err = ERR_OK);

By 

return ERR_OK;

Because there is no reason to change conn->err when we just read a state
value...

For the MAC problem (out of buffers could block sending more data), if I
resume some ideas in the mailing list, we can:

- not return an error in this case (finally, you also can lost packets on the
wire, TCP will retransmit datas - longer than necessary - so...)

- block inside the netif's linkoutput until a buffer is available (Jonathan
get a option in his port, and I add one in mine, this solution is not so
bad)

- filter the ERR_MEM error like a minor error (by adding a test just after a
udp_send/udp_sendto by example, and reset it to ERR_OK),

- 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)) ...



    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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