mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Turn on removing thread
This commit is contained in:
parent
5aadda49c9
commit
ed6564021d
2 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,7 @@ void insert_to_list(probe_entry entry)
|
||||||
entry.time = time(0);
|
entry.time = time(0);
|
||||||
|
|
||||||
// first delete probe request
|
// first delete probe request
|
||||||
probe_list_head = remove_old_entries(probe_list_head, time(0), TIME_THRESHOLD);
|
//probe_list_head = remove_old_entries(probe_list_head, time(0), TIME_THRESHOLD);
|
||||||
probe_list_head = delete_probe_req(probe_list_head, entry.bssid_addr, entry.client_addr);
|
probe_list_head = delete_probe_req(probe_list_head, entry.bssid_addr, entry.client_addr);
|
||||||
probe_list_head = insert(probe_list_head, entry);
|
probe_list_head = insert(probe_list_head, entry);
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ 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;
|
next = prev->ptr;
|
||||||
} else {
|
} else {
|
||||||
prev = next;
|
prev = next;
|
||||||
|
|
|
@ -46,8 +46,8 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
init_socket_runopts(opt_broadcast_ip, opt_broadcast_port);
|
init_socket_runopts(opt_broadcast_ip, opt_broadcast_port);
|
||||||
|
|
||||||
//pthread_t tid;
|
pthread_t tid;
|
||||||
//pthread_create(&tid, NULL, &remove_thread, NULL);
|
pthread_create(&tid, NULL, &remove_thread, NULL);
|
||||||
|
|
||||||
free_list(probe_list_head);
|
free_list(probe_list_head);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue