Fixed my last checkin that fixed bug #27117: "httpserver_raw sample does not call tcp_accepted()" accidentally called tcp_accepted() on the connection-pcb, not the listen-pcb

This commit is contained in:
goldsimon 2009-07-28 17:38:30 +00:00
parent 47521ce2bc
commit 4a5c399e7d

View File

@ -208,12 +208,13 @@ static err_t
http_accept(void *arg, struct tcp_pcb *pcb, err_t err)
{
struct http_state *hs;
struct tcp_pcb_listen *lpcb = (struct tcp_pcb_listen*)arg;
LWIP_UNUSED_ARG(arg);
LWIP_UNUSED_ARG(err);
/* Decrease the listen backlog counter */
tcp_accepted(pcb);
tcp_accepted(lpcb);
tcp_setprio(pcb, TCP_PRIO_MIN);
@ -254,6 +255,7 @@ httpd_init(void)
pcb = tcp_new();
tcp_bind(pcb, IP_ADDR_ANY, 80);
pcb = tcp_listen(pcb);
tcp_arg(pcb, pcb);
tcp_accept(pcb, http_accept);
}
/*-----------------------------------------------------------------------------------*/