lwIP - A Lightweight TCP/IP stack - Bugs: bug #26069, Documentation of tcp_connect()...
You are not allowed to post comments on this tracker with your current authentication level.
bug #26069: Documentation of tcp_connect() incorrectly describes handling of errors
Submitter: | Rikke Ottesen <ro03> | ||
Submitted: | Thu 02 Apr 2009 01:42:00 PM UTC | ||
Category: | TCP | Severity: | 3 - Normal |
Item Group: | Faulty Behaviour | Status: | Fixed |
Privacy: | Public | Assigned to: | goldsimon |
Open/Closed: | Closed | Planned Release: | None |
lwIP version: | 1.3.0 |
Jump to the original submission
Mon 02 Jun 2014 09:27:44 PM UTC, comment #19: |
Sergio R. Caprile <scaprile> |
Mon 02 Jun 2014 07:58:29 PM UTC, comment #18: The comment in the source code can be easily fixed, but I wouldn't omit the erro checking in connect callbacks: the parameter is there and we cannot remove it without breaking every code ever writes for lwIP. Plus the err parameter could be != ERR_OK sooner or later (e.g. on error if the err callback is not set). |
Simon Goldschmidt <goldsimon> |
Mon 02 Jun 2014 05:25:18 PM UTC, comment #17: Hi Simon, 5 years later I have to say "not so trivial".
|
Sergio R. Caprile <scaprile> |
Tue 21 Apr 2009 07:17:24 PM UTC, comment #16: Since I think this is trivial, I just updated rawapi.txt (~> "if connect fails, pcb->err is called") |
Simon Goldschmidt <goldsimon> |
Mon 06 Apr 2009 08:44:15 AM UTC, comment #15: Hello,
|
Iordan Neshev <iordan_neshev> |
Fri 03 Apr 2009 10:42:02 AM UTC, comment #14: Ok fine, just to be sure :) |
Rikke Ottesen <ro03> |
Fri 03 Apr 2009 10:19:10 AM UTC, comment #13: I'm going to change the documentation.
|
Kieran Mansley <kieranm> |
Fri 03 Apr 2009 10:03:25 AM UTC, comment #12: Just to be clear, are you going to change the code so it calls the TCP_EVENT_CONNECTED in this state, or are you going to change documentaion?
|
Rikke Ottesen <ro03> |
Fri 03 Apr 2009 09:28:12 AM UTC, comment #11: I can see how the documentation is confusing, it should be corrected.
|
Kieran Mansley <kieranm> |
Fri 03 Apr 2009 09:06:19 AM UTC, comment #10: As the lwip documentation state:
|
Rikke Ottesen <ro03> |
Fri 03 Apr 2009 09:01:31 AM UTC, comment #9: It will get there once pcb->ntrx increases to TCP_SYNMAXRTX. Note this can take some time to happen, as retransmissions back off exponentially. It may be that you're just not waiting long enough, and that setting TCP_SYNMAXRTX to a smaller value would help.
|
Kieran Mansley <kieranm> |
Fri 03 Apr 2009 08:52:03 AM UTC, comment #8: Yes, but the problem is that the pcb->state is SYN_SENT, and this is not checked.
|
Rikke Ottesen <ro03> |
Fri 03 Apr 2009 08:34:31 AM UTC, comment #7: If we get failure in tcp_slowtmr() would be set flag pcb_remove.
|
Oleg Tyshev <olegreen> |
Fri 03 Apr 2009 08:29:28 AM UTC, comment #6: If you fix this problem in some other way, than the newest attached file I gave you, could you please let me know? Then I'll add this fix in stead of my own. That would be great!
|
Rikke Ottesen <ro03> |
Fri 03 Apr 2009 08:25:42 AM UTC, comment #5: Yes, I think so. |
Kieran Mansley <kieranm> |
Fri 03 Apr 2009 08:13:30 AM UTC, comment #4: Im not that into the pcb->nrtx part, but one thing I do no is that the TCP_EVENT_CONNECTED() function is never called.
|
Rikke Ottesen <ro03> |
Thu 02 Apr 2009 02:50:56 PM UTC, comment #3: pcb->nrtx should eventually get to TCP_SYNMAXRTX, as pcb->ntrx is increased each time the SYN is retransmitted, so the suggested fragment should I think deal with detecting a duff connection. Are you saying that pcb->nrtx isn't getting increased properly, or perhaps that it is somehow greater than TCP_SYNMAXRTX?
|
Kieran Mansley <kieranm> |
Thu 02 Apr 2009 02:34:25 PM UTC, comment #2: I thought so to, but the pcb->nrtx == TCP_SYNMAXRTX is not true, so it does not go into this case.
|
Rikke Ottesen <ro03> |
Thu 02 Apr 2009 02:15:58 PM UTC, comment #1: Isn't this case covered by the lines (around tcp.c:583 in CVS head) in tcp_slowtmr():
|
Kieran Mansley <kieranm> |
Thu 02 Apr 2009 01:42:00 PM UTC, original submission:
Problem:
|
Rikke Ottesen <ro03> |
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 11 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2014-06-04 | goldsimon | Status | In Progress | Fixed | |
Open/Closed | Open | Closed | |||
2014-06-02 | goldsimon | Status | Fixed | In Progress | |
Open/Closed | Closed | Open | |||
2009-04-21 | goldsimon | Status | None | Fixed | |
Assigned to | None | goldsimon | |||
Open/Closed | Open | Closed | |||
2009-04-03 | kieranm | Planned Release | 1.3.1 | ||
2009-04-03 | kieranm | Summary | Connect to a remote IP address which is not present makes the APP hang | Documentation of tcp_connect() incorrectly describes handling of errors | |
2009-04-02 | ro03 | Attached File | - | Added tcp.c, #17850 | |
2009-04-02 | ro03 | Attached File | - | Added tcp.c, #17849 |
Powered by Savane 3.13-f8d8.
Corresponding source code
OK, fixed the wiki and will keep checking for err == ERR_OK in tcp_connect callback. THX!