[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] Desiderata for 2.2.0: (4) avoid useless events in socket/ac
From: |
Renzo Davoli |
Subject: |
[lwip-devel] Desiderata for 2.2.0: (4) avoid useless events in socket/accept |
Date: |
Fri, 3 Feb 2023 11:15:51 +0100 |
Hi,
The patch here attached just swaps two sections of the code in
socket.c, function lwip_accept.
In the current implementation it sends the "anticipated" events
to the callback while it can still fail.
see line 727/728:
727 err = netconn_peer(newconn, &naddr, &port);
728 if (err != ERR_OK) {
...
The patch sends the events only when lwip_accept cannot fail any more.
Thank you.
renzo
FYI. Why I need this patch.
I am developing the code to add a compatibility layer for lwip to libioth.
https://github.com/virtualsquare/libioth
https://archive.fosdem.org/2021/schedule/event/microkernel_libioth/attachments/slides/4319/export/events/attachments/microkernel_libioth/slides/4319/libioth_slides.pdf
I overrride the event callback. Currently lwip_accept may send events
for a socket that will never be created, and there is neither an event
to notify the failure...
4.socket_accept_avoid_useless_events.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] Desiderata for 2.2.0: (4) avoid useless events in socket/accept,
Renzo Davoli <=