[Listener] Use verbosity instead of #ifdef DEBUG
Whenever possible, test the value of GET_VERBOSE() instead of a #ifdef DEBUG.
This commit is contained in:
parent
80f17b08b7
commit
ac8438a33b
|
@ -354,6 +354,7 @@ void check_configuration()
|
|||
print_usage() ;
|
||||
exit(ERR_BAD_USAGE) ;
|
||||
}
|
||||
|
||||
if (GET_RTAP_IFACE()[0] == '\0')
|
||||
{
|
||||
fprintf(stderr, "Error! You must specify a radiotap interface"
|
||||
|
@ -361,15 +362,16 @@ void check_configuration()
|
|||
print_usage() ;
|
||||
exit(ERR_BAD_USAGE) ;
|
||||
}
|
||||
|
||||
if (GET_WIFI_IFACE()[0] == '\0')
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "Warning! No Wi-Fi was specified. Failing back to"
|
||||
" the radiotap interface (%s) instead.\n",
|
||||
if (GET_VERBOSE())
|
||||
fprintf(stderr, "No Wi-Fi interface was specified. Failing back"
|
||||
" to the radiotap interface (%s) instead.\n",
|
||||
GET_RTAP_IFACE()) ;
|
||||
#endif // DEBUG
|
||||
SET_WIFI_IFACE(GET_RTAP_IFACE()) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -429,9 +431,8 @@ void print_configuration()
|
|||
*/
|
||||
void keep_mode_monitor(char *iface)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (GET_VERBOSE())
|
||||
fprintf(stderr, "Thread for keeping monitor mode launched.\n") ;
|
||||
#endif // DEBUG
|
||||
|
||||
while (run)
|
||||
{
|
||||
|
@ -885,9 +886,8 @@ void autocalibrate_hello()
|
|||
struct sockaddr_in serv;
|
||||
autocalibration_hello message ;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (GET_VERBOSE())
|
||||
fprintf(stderr, "Autocalibration Hello thread launched.\n") ;
|
||||
#endif // DEBUG
|
||||
|
||||
send_sockfd =
|
||||
owlps_create_socket_to_aggregator(GET_AGGREGATION_IP(),
|
||||
|
@ -916,9 +916,8 @@ void autocalibrate()
|
|||
int listen_sockfd ;
|
||||
autocalibration_order message ;
|
||||
|
||||
#ifdef DEBUG
|
||||
if (GET_VERBOSE())
|
||||
fprintf(stderr, "Autocalibration thread launched.\n") ;
|
||||
#endif // DEBUG
|
||||
|
||||
// Socket to send autocalibration positioning requests
|
||||
autocalibration_send_sockfd =
|
||||
|
@ -951,10 +950,9 @@ void autocalibrate()
|
|||
|
||||
if (ntohl(message.order) == AUTOCALIBRATION_ORDER_SEND)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "I just was ordered to send an autocalibration"
|
||||
" request...\n") ;
|
||||
#endif // DEBUG
|
||||
if (GET_VERBOSE())
|
||||
fprintf(stderr, "I was just ordered to send an"
|
||||
" autocalibration request...\n") ;
|
||||
send_autocalibration_request() ;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue