diff --git a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c index f7cf130..d603e9e 100644 --- a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c +++ b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c @@ -23,6 +23,7 @@ int main(int argc, char **argv) struct sigaction action ; // Signal handler structure pthread_t monitor_thread, // Aggregated data monitoring thread + monitor_aps_thread, // APs monitoring thread autocalibration_hello_thread ; // Hello messages reception thread unsigned int listening_port ; int sockfd ; // UDP listening socket @@ -51,6 +52,8 @@ int main(int argc, char **argv) (void *) &monitor_couples, NULL) ; pthread_create(&autocalibration_hello_thread, NULL, (void *) &listen_for_aps, NULL) ; + pthread_create(&monitor_aps_thread, NULL, + (void *) &monitor_aps, NULL) ; run = TRUE ; ret = read_loop(sockfd) ; @@ -798,6 +801,10 @@ void push_ap(ap_list *ap) */ void monitor_aps() { +#ifdef DEBUG + fprintf(stderr, "Monitor AP thread launched.\n") ; +#endif // DEBUG + while (run) { delete_old_aps() ;