lwIP - A Lightweight TCP/IP stack - Bugs: bug #46685, pcb->accepts_pending is not...
You are not allowed to post comments on this tracker with your current authentication level.
bug #46685: pcb->accepts_pending is not decreased
Submitter: | PIPON <harvey> | ||
Submitted: | Tue 15 Dec 2015 10:48:11 AM UTC | ||
Category: | None | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Invalid |
Privacy: | Public | Assigned to: | jcunningham |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | 1.3.2 |
Jump to the original submission
Mon 11 Jan 2016 03:46:53 PM UTC, comment #9: |
Joel Cunningham <jcunningham> |
Fri 08 Jan 2016 03:36:24 PM UTC, comment #8: 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
|
Joel Cunningham <jcunningham> |
Fri 08 Jan 2016 06:36:56 AM UTC, comment #7: Hello,
|
PIPON <harvey> |
Thu 07 Jan 2016 05:44:05 PM UTC, comment #6: Actually the pcb returned from tcp_listen() is of type struct tcp_pcb_listen *lpcb, but it has been casted. Take a look at tcp_listen_with_backlog(). The original pcb is transformed into type tcp_pcb_listen, which you can pass to tcp_accepted()
|
Joel Cunningham <jcunningham> |
Thu 07 Jan 2016 04:17:09 PM UTC, comment #5: Hello
|
PIPON <harvey> |
Thu 07 Jan 2016 02:50:20 PM UTC, comment #4: Thanks for the example code, since you're using the Raw API in your application, your application code is responsible for calling tcp_accepted() after having accepted the connection via tcp_accept(). This performs the bookkeeping on the accepts_pending that is not happening in your case
|
Joel Cunningham <jcunningham> |
Thu 07 Jan 2016 09:40:13 AM UTC, comment #3: Hello Joël
I'm using tcp_listen_with_backlog to listen the port
The connexion succeeded : I close it and open a new one six times …
The sockets are in CLOSE_WAIT states and the accept_pending was increased but not decreased …..
|
PIPON <harvey> |
Wed 06 Jan 2016 03:31:14 PM UTC, comment #2: I took a look at your original post and what socket/netconn calls are you performing to accept the connection? Or are you using the raw API?
|
Joel Cunningham <jcunningham> |
Wed 06 Jan 2016 09:01:20 AM UTC, comment #1: {{note|Waiting for a better solution I added a bold*tcp_accepted*bold call when a connection is established....}}
|
PIPON <harvey> |
Tue 15 Dec 2015 10:48:11 AM UTC, original submission:
Hello,
|
PIPON <harvey> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-01-11 | jcunningham | Status | None | Invalid | |
Assigned to | None | jcunningham | |||
Open/Closed | Open | Closed |
Powered by Savane 3.13-02a9.
Corresponding source code
Closing this, the behavior seen by OP is not a bug, but an application issue