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:
sg
2016-03-23 21:57:38 +01:00
parent c6b742812d
commit 7721b20179
5 changed files with 26 additions and 7 deletions

View File

@@ -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);