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

Submitter:  Charles Landau <clandau>
Submitted:  Wed 24 Jun 2009 06:04:24 PM UTC
   
 
Category:  TCP Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Planned 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>
Group Member
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    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
    2009-06-25 kieranm StatusNone Fixed
        Open/ClosedOpen Closed
    2009-06-24 clandau Carbon-Copy- Added clandau

    Back to the top

    Powered by Savane 3.13-bb6a.
    Corresponding source code