mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-30 22:43:54 +08:00
call accept-callback with ERR_MEM when allocating a pcb fails on passive open to inform the application about this error; ATTENTION: applications have to handle NULL pcb in accept callback!
This commit is contained in:
@@ -2290,6 +2290,10 @@ http_accept(void *arg, struct tcp_pcb *pcb, err_t err)
|
||||
LWIP_UNUSED_ARG(err);
|
||||
LWIP_DEBUGF(HTTPD_DEBUG, ("http_accept %p / %p\n", (void*)pcb, arg));
|
||||
|
||||
if ((err != ERR_OK) || (pcb == NULL)) {
|
||||
return ERR_VAL;
|
||||
}
|
||||
|
||||
/* Set priority */
|
||||
tcp_setprio(pcb, HTTPD_TCP_PRIO);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user