From 0a8ef2793bb9f8530a53716965359133f381b94a Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Tue, 26 Oct 2010 17:25:00 +0200 Subject: [PATCH] [Aggregator] Check "autocalibration" option Option "autocalibration" (-a) was implemented but not checked (autocalibration was always activated). This is now fixed. --- .../owlps-aggregator/owlps-aggregatord.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c index c3d0c1c..d83c17e 100644 --- a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c +++ b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c @@ -50,10 +50,13 @@ int main(int argc, char **argv) /* Set up threads */ pthread_create(&monitor_thread, NULL, (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) ; + if (cfg_getbool(cfg, "autocalibration")) + { + 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) ;