[Listener] Same port for all requests
The autocalibration requests are now sent on the same port as the positioning request, by default. There was no real reason to send them on a different port.
This commit is contained in:
parent
a0005e9dad
commit
ee3ab7b383
|
@ -19,14 +19,13 @@ extern "C" {
|
|||
#include <netinet/if_ether.h>
|
||||
|
||||
|
||||
// Port on which the positioning request is sent by the mobile:
|
||||
// Port on which the positioning and calibration requests are sent by
|
||||
// the mobiles (or the listeners for autocalibration requests):
|
||||
#define OWL_DEFAULT_REQUEST_PORT 9900
|
||||
// Port on which listeners and aggregator communicate:
|
||||
#define OWL_DEFAULT_LISTENER_PORT 9901
|
||||
// Port on which aggregator and positioning server communicate:
|
||||
#define OWL_DEFAULT_AGGREGATION_PORT 9902
|
||||
// Port on which autocalibration requests are sent by the listeners:
|
||||
#define OWL_DEFAULT_AUTOCALIBRATION_REQUEST_PORT 9903
|
||||
// Port on which the aggregator listens for hello messages from the
|
||||
// listeners, and the listeners listen for orders from the aggregator:
|
||||
#define OWL_DEFAULT_AUTOCALIBRATION_PORT 9904
|
||||
|
|
|
@ -98,7 +98,7 @@ struct {
|
|||
#ifdef USE_PTHREAD
|
||||
owl_false,
|
||||
"",
|
||||
OWL_DEFAULT_AUTOCALIBRATION_REQUEST_PORT,
|
||||
0,
|
||||
OWL_DEFAULT_AUTOCALIBRATION_PORT,
|
||||
DEFAULT_AUTOCALIBRATION_HELLO_DELAY,
|
||||
DEFAULT_AUTOCALIBRATION_DELAY,
|
||||
|
@ -327,9 +327,9 @@ int parse_config_file(int argc, char **argv)
|
|||
// Destination IP address of the autocalibration requests (default:
|
||||
// none, but will be set to aggregation_ip in the config check):
|
||||
CFG_STR("autocalibration_ip", "", CFGF_NONE),
|
||||
// Port on which autocalibration requests are sent:
|
||||
CFG_INT("autocalibration_request_port",
|
||||
OWL_DEFAULT_AUTOCALIBRATION_REQUEST_PORT, CFGF_NONE),
|
||||
// Port on which autocalibration requests are sent (default: 0,
|
||||
// but will be set to listening_port in the config check):
|
||||
CFG_INT("autocalibration_request_port", 0, CFGF_NONE),
|
||||
// Port on which autocalibration data are exchanged:
|
||||
CFG_INT("autocalibration_port", OWL_DEFAULT_AUTOCALIBRATION_PORT,
|
||||
CFGF_NONE),
|
||||
|
@ -650,7 +650,7 @@ int check_configuration()
|
|||
if (VERBOSE_WARNING)
|
||||
fprintf(stderr, "Warning! Bad autocalibration_request_port:"
|
||||
" failing back to the default value.\n") ;
|
||||
SET_AUTOCALIBRATION_REQUEST_PORT(OWL_DEFAULT_AUTOCALIBRATION_REQUEST_PORT) ;
|
||||
SET_AUTOCALIBRATION_REQUEST_PORT(GET_LISTENING_PORT()) ;
|
||||
}
|
||||
if (GET_AUTOCALIBRATION_PORT() < 1 ||
|
||||
GET_AUTOCALIBRATION_PORT() > 65535)
|
||||
|
@ -1529,7 +1529,7 @@ void print_usage()
|
|||
"\t-I autocalib_ip\t\tDestination IP of the autocalibration"
|
||||
" requests\n\t\t\t\t(default: aggregation_ip).\n"
|
||||
"\t-P autocalib_req_port\tPort on which autocalibration"
|
||||
" requests are sent\n\t\t\t\t(default: %d).\n"
|
||||
" requests are sent\n\t\t\t\t(default: listening_port).\n"
|
||||
"\t-a autocalib_port\tPort on which autocalibration data (hello"
|
||||
" &\n\t\t\t\torders) are exchanged with the aggregation"
|
||||
"\n\t\t\t\tserver (default: %d).\n"
|
||||
|
@ -1556,7 +1556,6 @@ void print_usage()
|
|||
DEFAULT_CONFIG_FILE,
|
||||
OWL_DEFAULT_REQUEST_PORT,
|
||||
OWL_DEFAULT_LISTENER_PORT,
|
||||
OWL_DEFAULT_AUTOCALIBRATION_REQUEST_PORT,
|
||||
OWL_DEFAULT_AUTOCALIBRATION_PORT,
|
||||
DEFAULT_AUTOCALIBRATION_HELLO_DELAY,
|
||||
DEFAULT_AUTOCALIBRATION_DELAY,
|
||||
|
|
Loading…
Reference in New Issue