[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] [lwip] wrong type for "pcb->tmr" ?
From: |
Jörg Kesten |
Subject: |
[lwip-users] [lwip] wrong type for "pcb->tmr" ? |
Date: |
Wed, 08 Jan 2003 23:38:32 -0000 |
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.]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] [lwip] wrong type for "pcb->tmr" ?,
Jörg Kesten <=