lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #46685] pcb->accepts_pending is not decreased


From: Joel Cunningham
Subject: [lwip-devel] [bug #46685] pcb->accepts_pending is not decreased
Date: Fri, 08 Jan 2016 15:36:24 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:43.0) Gecko/20100101 Firefox/43.0

Follow-up Comment #8, bug #46685 (project lwip):

Right, inside your accept callback, pcb is the new connection.  You'll need to
reference the listener pcb.  You could save this in a static global.  I would
imagine you're already storing your listener pcb somewhere that is not a
function scoped variable otherwise it would be leaking when your init function
goes out of scope

Or the listening pcb can be passed as the arg in your callback if you use
tcp_arg() to register the listener pcb

void ftpd_init (void)
{
    pcb = tcp_new();
    tcp_bind (pcb, IP_ADDR_ANY, 21);
    pcb = tcp_listen (pcb);
    tcp_arg(pcb, pcb);
    tcp_accept (pcb, ftpd_msgaccept);
}


    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?46685>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]