mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Fix remove function
This commit is contained in:
parent
ed6564021d
commit
806bb9f1af
1 changed files with 12 additions and 3 deletions
|
@ -182,9 +182,18 @@ node* remove_old_entries(node* head, time_t current_time, long long int threshol
|
||||||
if(next->data.time < current_time - threshold)
|
if(next->data.time < current_time - threshold)
|
||||||
{
|
{
|
||||||
head = remove_node(head, next, prev);
|
head = remove_node(head, next, prev);
|
||||||
//print_list_with_head(head);
|
//print_list_with_head(head);
|
||||||
next = prev->ptr;
|
if(prev == NULL) // removed head
|
||||||
} else {
|
{
|
||||||
|
next = head;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
next = prev->ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
prev = next;
|
prev = next;
|
||||||
next = next->ptr;
|
next = next->ptr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue