diff --git a/owlps-listener/owlps-listenerd.c b/owlps-listener/owlps-listenerd.c index 1f8818e..b60de34 100644 --- a/owlps-listener/owlps-listenerd.c +++ b/owlps-listener/owlps-listenerd.c @@ -92,28 +92,28 @@ struct { #endif // USE_PTHREAD uint_fast8_t verbose ; } options = { // Initalise default options: - owl_false, - MODE_ACTIVE, - "127.0.0.1", - OWL_DEFAULT_LISTENER_PORT, - OWL_DEFAULT_REQUEST_PORT, + owl_false, // daemon + MODE_ACTIVE, // mode + "127.0.0.1", // aggregation_ip + OWL_DEFAULT_LISTENER_PORT, // aggregation_port + OWL_DEFAULT_REQUEST_PORT, // listening_port #ifdef ENABLE_KEEP_MONITOR - owl_false, + owl_false, // keep_monitor #endif // ENABLE_KEEP_MONITOR - "", - "", + "", // rtap_iface + "", // wifi_iface #ifdef USE_PTHREAD - owl_false, - "", - 0, - OWL_DEFAULT_AUTOCALIBRATION_ORDER_PORT, - OWL_DEFAULT_AUTOCALIBRATION_HELLO_PORT, - DEFAULT_AUTOCALIBRATION_HELLO_DELAY, - DEFAULT_AUTOCALIBRATION_DELAY, - DEFAULT_AUTOCALIBRATION_NBPKT, - 0, 0, 0, 0, + owl_false, // autocalibration + "", // autocalibration_ip + 0, // autocalibration_request_port + OWL_DEFAULT_AUTOCALIBRATION_ORDER_PORT, // autocalibration_order_port + OWL_DEFAULT_AUTOCALIBRATION_HELLO_PORT, // autocalibration_hello_port + DEFAULT_AUTOCALIBRATION_HELLO_DELAY, // autocalibration_hello_delay + DEFAULT_AUTOCALIBRATION_DELAY, // autocalibration_delay + DEFAULT_AUTOCALIBRATION_NBPKT, // autocalibration_nb_packets + 0, 0, 0, 0, // Calibration data #endif // USE_PTHREAD - 0 + 0 // verbose } ; #endif // USE_CONFIG_FILE @@ -660,14 +660,12 @@ int check_configuration() " direction.\n", (int) GET_MY_DIRECTION()) ; // Autocalibration port numbers + if (GET_AUTOCALIBRATION_REQUEST_PORT() > 65535 && VERBOSE_WARNING) + fprintf(stderr, "Warning! Bad autocalibration_request_port:" + " failing back to the default value.\n") ; if (GET_AUTOCALIBRATION_REQUEST_PORT() < 1 || GET_AUTOCALIBRATION_REQUEST_PORT() > 65535) - { - if (VERBOSE_WARNING) - fprintf(stderr, "Warning! Bad autocalibration_request_port:" - " failing back to the default value.\n") ; - SET_AUTOCALIBRATION_REQUEST_PORT(GET_LISTENING_PORT()) ; - } + SET_AUTOCALIBRATION_REQUEST_PORT(GET_LISTENING_PORT()) ; if (GET_AUTOCALIBRATION_ORDER_PORT() < 1 || GET_AUTOCALIBRATION_ORDER_PORT() > 65535) {