[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] [lwip] Mime-Version: 1.0
From: |
Paul Sheer |
Subject: |
[lwip-users] [lwip] Mime-Version: 1.0 |
Date: |
Thu, 09 Jan 2003 01:33:46 -0000 |
------=_Part_16_439158.1039108360078
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
good work
-paul
Powered by World Online - http://www.worldonline.co.za
------------- Original Message --------------
From: J?rg Kesten address@hidden
To: address@hidden
Cc:
Date: Wed,12/04/2002 19:19:15
Subject: [lwip] wrong type for "pcb->tmr" ?
Hi all,
I think there is a bug in the definition of the pcb structure. The "tmr"
member variable is defined as "u16_t", but upon creation of a new pcb in
"tcp_new()" it is initialized with the current value of tcp_ticks, which
is of type "u32_t".
The problem we encountered is this:
We connect to our device over a gsm-modem connection, i.e. "ping time"
is 700-800 ms. Thus, after receiving a "SYN", tcp_slowtmr() is triggerd
while the pcb is in state "SYN_RECV".
For the first 9h or so everything works fine, but when the value of
"tcp_ticks" leaves the u16_t range, the value is truncated in
tcp_new(): pcb->tmr = tcp_ticks.
Then the check:
if(pcb->state == SYN_RCVD) {
-> if((u32_t)(tcp_ticks - pcb->tmr) >
TCP_SYN_RCVD_TIMEOUT / TCP_SLOW_INTERVAL) {
++pcb_remove;
}
}
in tcp_slowtmr() always is true and the pcb will be deleted before the
connection can be established.
We changed the type of pcb->tmr to u32_t, and now everything seems to work.
The question is, is this the right fix, or has it to be done in a
different way? Did we break something in another place?
CU
Joerg
--
email: address@hidden
[This message was sent through the lwip discussion list.]
------=_Part_16_439158.1039108360078--
[This message was sent through the lwip discussion list.]