buglwIP - A Lightweight TCP/IP stack - Bugs: bug #2208, sys_timeout() does not adjust...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #2208: sys_timeout() does not adjust existing timeouts properly

Submitted by:  David Haas <davidhaas>
Submitted on:  Mon 13 Jan 2003 08:22:34 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Mon 13 Jan 2003 08:32:16 PM UTC, comment #1:

After thinking about this more, I see that I am wrong. This is not a problem. The time of each timer is additive, so in fact only the next one needs to be decremented.

Obviously not enough caffeine on my part.

David Haas <davidhaas>
Project Member
Mon 13 Jan 2003 08:22:34 PM UTC, original submission:

In the code please see my added comment:

if(timeouts->next->time > msecs) {
timeouts->next->time -= msecs;
timeout->next = timeouts->next;
timeouts->next = timeout;
} else {
for(t = timeouts->next; t != NULL; t = t->next) {
timeout->time -= t->time;
if(t->next == NULL ||
t->next->time > timeout->time) {
if(t->next != NULL) {
/* RIGHT HERE: We should adjust all the timeouts in the
list following where this one is inserted.
Not just the next one!!! */
t->next->time -= timeout->time;
}
timeout->next = t->next;
t->next = timeout;
break;
}
}
}

This will cause later timeouts to be incorrect.

David Haas <davidhaas>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Tue 14 Jan 2003 07:41:55 AM UTCjaniStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1