[Top][All Lists]

[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: Gecko/2009060214 Firefox/3.0.11


                 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



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 !=
  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:


  Message sent via/by Savannah

reply via email to

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