[uip-users] uip: bug report !

15 views
Skip to first unread message

Samuel Engelmajer

unread,
Mar 7, 2007, 6:41:36 AM3/7/07
to uip-...@sics.se

Hi all,

I'm using uip on a Blackfin Analog Device.
I had a problem while trying to connect to a tcp remote host.
uip_buf was not filled with tcp SYN data after calling uip_periodic_con().

In uip.c line 740 you can find:
********************************
if(uip_outstanding(uip_connr)) {
if(uip_connr->timer --== 0) {
********************************
Initialy 'timer' equals 1, but it never goes into the 2nd if!

Should be replaced with:
********************************
if(uip_outstanding(uip_connr)) {
uip_connr->timer = uip_connr->timer-1 ;
if(uip_connr->timer== 0) {
********************************
which works.

Maybe can help some of you.


Samuel

Nico Coesel (Dealogic)

unread,
Mar 7, 2007, 7:12:44 AM3/7/07
to uip-...@sics.se
I tested that piece of code last week. The comparison is performed before
the decrement. So the if will trigger when timer is equal to 0.

Nico Coesel


-----Oorspronkelijk bericht-----
Van: owner-u...@sics.se [mailto:owner-u...@sics.se] Namens Samuel
Engelmajer
Verzonden: woensdag 7 maart 2007 12:42
Aan: uip-...@sics.se
Onderwerp: [uip-users] uip: bug report !

Olaf Hartmann

unread,
Mar 7, 2007, 9:06:26 AM3/7/07
to uip-...@sics.se


I just call uip_periodic() twice before the main-loop to get things
started without delay.
Which means: I can confirm this minor bug for active TCP connections.


Olaf


Reply all
Reply to author
Forward
0 new messages