diff --git a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c index e181629..4984355 100644 --- a/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c +++ b/infrastructure-centred/owlps-aggregator/owlps-aggregatord.c @@ -756,6 +756,12 @@ ap_list* find_ap(unsigned char mac_addr_bytes[6]) */ ap_list* add_ap_front(unsigned char mac_addr_bytes[6]) { +#ifdef DEBUG + char *mac = mac_bytes_to_string(mac_addr_bytes) ; + fprintf(stderr, "Creating AP with MAC address « %s »...\n", mac) ; + free(mac) ; +#endif // DEBUG + ap_list *ap = malloc(sizeof(ap_list)) ; memcpy(ap->mac_addr_bytes, mac_addr_bytes, 6) ; update_ap_seen(ap) ; @@ -861,6 +867,13 @@ void delete_old_aps() */ void delete_ap(ap_list *ap) { +#ifdef DEBUG + assert(ap) ; + char *mac = mac_bytes_to_string(token_aps->mac_addr_bytes) ; + fprintf(stderr, "Deleting AP « %s »...\n", mac) ; + free(mac) ; +#endif // DEBUG + unlink_ap(ap) ; free(ap) ; --nb_aps ; @@ -873,11 +886,13 @@ void delete_ap(ap_list *ap) */ void unlink_ap(ap_list *ap) { - assert(ap) ; ap_list - *ap_previous = ap->previous, - *ap_next = ap->next ; + *ap_previous, + *ap_next ; + assert(ap) ; + ap_previous = ap->previous ; + ap_next = ap->next ; assert(ap_previous) ; assert(ap_next) ; @@ -1076,8 +1091,8 @@ void print_usage() " requests (default\t%d microseconds).\n" "Autocalibration options:\n" - "\t-A\tEnable autocalibration (default: disabled).\n" - "\t-a port\tPort on which autocalibration data" + "\t-A\t\t\tEnable autocalibration (default: disabled).\n" + "\t-a port\t\t\tPort on which autocalibration data" " are exchanged with the listeners (default: %d).\n" "\t-K ap_keep_timeout\tInactive APs are kept during" " 'ap_keep_timeout' seconds (default: %d s).\n"