lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #26879] tcp_slowtmr err


From: Charles Landau
Subject: [lwip-devel] [bug #26879] tcp_slowtmr err
Date: Wed, 24 Jun 2009 18:04:26 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11

URL:
  <http://savannah.nongnu.org/bugs/?26879>

                 Summary: tcp_slowtmr err
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: clandau
            Submitted on: Wed 24 Jun 2009 06:04:24 PM GMT
                Category: TCP
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: 1.3.0

    _______________________________________________________

Details:

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.





    _______________________________________________________

Reply to this item at:

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

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





reply via email to

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