[Listener] Update configuration display

Configuration display when not using libconfuse was outdated.
This commit is contained in:
Matteo Cypriani 2010-10-21 15:39:14 +02:00
parent 737630b8c9
commit 6cbbcc957b
2 changed files with 21 additions and 5 deletions

View File

@ -372,23 +372,38 @@ void print_configuration()
cfg_print(cfg, stderr) ; cfg_print(cfg, stderr) ;
#else // USE_CONFIG_FILE #else // USE_CONFIG_FILE
fprintf(stderr, fprintf(stderr,
"mode = %c\n"
"aggregation_ip = \"%s\"\n" "aggregation_ip = \"%s\"\n"
"aggregation_port = %ld\n" "aggregation_port = %ld\n"
"listening_port = %ld\n" "listening_port = %ld\n"
"rtap_iface = \"%s\"\n" "rtap_iface = \"%s\"\n"
"wifi_iface = \"%s\"\n" "wifi_iface = \"%s\"\n"
#ifdef USE_PTHREAD
"keep_monitor = %s\n"
"autocalibration = %s\n"
"autocalibration_port = %ld\n"
"autocalibration_hello_delay = %ld\n"
"autocalibration_delay = %ld\n"
"autocalibration_nb_packets = %d\n"
#endif // USE_PTHREAD
"verbose = %s\n"
, ,
GET_MODE(),
GET_AGGREGATION_IP(), GET_AGGREGATION_IP(),
GET_AGGREGATION_PORT(), GET_AGGREGATION_PORT(),
GET_LISTENING_PORT(), GET_LISTENING_PORT(),
GET_RTAP_IFACE(), GET_RTAP_IFACE(),
GET_WIFI_IFACE() GET_WIFI_IFACE(),
);
#ifdef USE_PTHREAD #ifdef USE_PTHREAD
fprintf(stderr, "keep_monitor = %s\n", BOOL_TO_STRING(GET_KEEP_MONITOR()),
GET_KEEP_MONITOR() ? "true" : "false" BOOL_TO_STRING(GET_AUTOCALIBRATION()),
) ; GET_AUTOCALIBRATION_PORT(),
GET_AUTOCALIBRATION_HELLO_DELAY(),
GET_AUTOCALIBRATION_DELAY(),
GET_AUTOCALIBRATION_NBPKT(),
#endif // USE_PTHREAD #endif // USE_PTHREAD
BOOL_TO_STRING(GET_VERBOSE())
) ;
#endif // USE_CONFIG_FILE #endif // USE_CONFIG_FILE
} }
#endif // DEBUG #endif // DEBUG

View File

@ -51,6 +51,7 @@
/* Type booléen */ /* Type booléen */
typedef enum {FALSE, TRUE} BOOL ; typedef enum {FALSE, TRUE} BOOL ;
#define BOOL_TO_STRING(B) ((B) ? "true" : "false")
/* Type direction */ /* Type direction */