[Aggregator] Add some debug messages
This commit is contained in:
parent
8fdfd6819e
commit
ae3131c047
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue