buglwIP - A Lightweight TCP/IP stack - Bugs: bug #26879, tcp_slowtmr err

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #26879: tcp_slowtmr err

Submitted by:  Charles Landau <clandau>
Submitted on:  Wed 24 Jun 2009 06:04:24 PM UTC  
 
Category: TCPSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.3.0

Thu 25 Jun 2009 10:04:20 AM UTC, comment #1:

Done. Thanks. I applied the same fix to some of the other TCP_EVENT_ macros that looked like they had the same issue too.

Kieran Mansley <kieranm>
Project Administrator
Wed 24 Jun 2009 06:04:24 PM UTC, original submission:

If LWIP_EVENT_API is zero, we have:
#define TCP_EVENT_POLL(pcb,ret) \
if ((pcb)->poll != NULL) \
(ret = ...)

In tcp_slowtmr, we have the only use of TCP_EVENT_POLL:

err_t err;
err = ERR_OK;
while (pcb != NULL) {
...
TCP_EVENT_POLL(pcb, err);
if (err == ERR_OK) {
...
}
pcb = ...
}

The code will fail if:
1. The first time through the loop, pcb->poll is not NULL and err is set != ERR_OK.
2. The next time through the loop, pcb->poll is NULL. It will act as though the pcb had a poll callback and it returned an error.

This might be fixed by appending
else (ret) = ERR_OK;
to the definition of TCP_EVENT_POLL.

Charles Landau <clandau>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by kieranm (Posted a comment)
  • -unavailable- added by clandau (Submitted the item)
  • -unavailable- added by clandau
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 25 Jun 2009 10:04:20 AM UTCkieranmStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Wed 24 Jun 2009 06:04:24 PM UTCclandauCarbon-Copy-=>Added clandau

    Back to the top


    Powered by Savane 3.1-cleanup1