mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
Fix mutex issue
This commit is contained in:
parent
9f024afe64
commit
0ea12984a8
3 changed files with 28 additions and 19 deletions
14
src/main.c
14
src/main.c
|
|
@ -38,10 +38,20 @@ int main(int argc, char **argv)
|
|||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
if (pthread_mutex_init(&list_mutex, NULL) != 0)
|
||||
{
|
||||
printf("\n mutex init failed\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
init_socket_runopts(opt_broadcast_ip, opt_broadcast_port);
|
||||
|
||||
pthread_t tid;
|
||||
pthread_create(&tid, NULL, &remove_thread, NULL);
|
||||
//pthread_t tid;
|
||||
//pthread_create(&tid, NULL, &remove_thread, NULL);
|
||||
|
||||
free_list(probe_list_head);
|
||||
|
||||
pthread_mutex_destroy(&list_mutex);
|
||||
|
||||
dawn_init_ubus(ubus_socket);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue