[Aggregator] Launch monitor aps thread
This commit is contained in:
parent
05ceea9950
commit
bdecd07125
|
@ -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() ;
|
||||
|
|
Loading…
Reference in New Issue