> I have not seen a single http_rcve() with pbuf=NULL yet.
We see it whenever a connection is closed, and use it to free the
tcp_arg:
static err_t http_recv_callback(void *arg, struct tcp_pcb *pcb, struct
pbuf *p, err_t err) {
struct web_t *webdata = arg;
if (err == ERR_OK) {
if (p == NULL) {
if (pcb->state == CLOSE_WAIT) {
tcp_close(pcb); //received FIN, need to send FIN
}
tcp_arg(pcb, NULL);
mem_free(webdata);
} else { //p != NULL
//actual http server code...
Ben
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users