Hi, I'm working with the lwIP 1.4.1 on a TI M4 platform with rawapi and I'm having trouble to understand the documentation correctly. In particular the callback for tcp_recv(). In the rawapi.txt is said
"If there are no errors and the callback function is to return ERR_OK, then it must free the pbuf. Otherwise, it must not free the pbuf so that lwIP core code can store it." But in the echo example there is this part: echo_recv() { ... else if(err != ERR_OK) { /* cleanup, for unkown reason */ if (p != NULL) { es->p = NULL; pbuf_free(p); } ret_err = err; } The pbuf is freed AND the callback function returns an error. What would happen with the pbuf if it is not freed? Kind regards, Chris _______________________________________________ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users