lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #6930] Implement SO_LINGER


From: Simon Goldschmidt
Subject: [lwip-devel] [task #6930] Implement SO_LINGER
Date: Thu, 28 Jun 2007 14:58:34 +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 #12, task #6930 (project lwip):

Re comment #10:

> netconn_close/do_close now just do a tcp_close for NETCONN_TCP,
> and return ERR_VAL for the other

Yes, ERR_OK might be better for other types.

>  do you want or not to call netconn_close (and also
> netconn_delete) in lwip_close (it's not in your patch)?

netconn_delete is definitely needed in lwip_close. since it already calls
tcp_close, netconn_close is not needed, I think.

But my patch isn't correct after reading Magnus Berglund's post. Waiting for
tcp_close returning ERR_OK is definitely needed. I would handle it by not
acknowledging in do_close and call tcp_close again from sent_tcp or poll_tcp.
That way, we both avoid the loop in netconn_close and the need for conn->sem
(faster, less context-switches, no race conditions).

I'll prepare a patch.

    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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