[Listener] check_configuration(): port numbers
This commit is contained in:
parent
5c123d769f
commit
8e1466eacc
|
@ -397,6 +397,38 @@ void check_configuration()
|
||||||
" the aggregation IP as the destination of"
|
" the aggregation IP as the destination of"
|
||||||
" autocalibration requests.\n") ;
|
" autocalibration requests.\n") ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Port numbers //
|
||||||
|
if (GET_AGGREGATION_PORT() < 1 || GET_AGGREGATION_PORT() > 65535)
|
||||||
|
{
|
||||||
|
if (GET_VERBOSE())
|
||||||
|
fprintf(stderr, "Warning! Bad aggregation_port:"
|
||||||
|
" failing back to the default value.\n") ;
|
||||||
|
SET_AGGREGATION_PORT(AGGREGATE_DEFAULT_PORT) ;
|
||||||
|
}
|
||||||
|
if (GET_LISTENING_PORT() < 1 || GET_LISTENING_PORT() > 65535)
|
||||||
|
{
|
||||||
|
if (GET_VERBOSE())
|
||||||
|
fprintf(stderr, "Warning! Bad listening_port:"
|
||||||
|
" failing back to the default value.\n") ;
|
||||||
|
SET_LISTENING_PORT(LOC_REQUEST_DEFAULT_PORT) ;
|
||||||
|
}
|
||||||
|
if (GET_AUTOCALIBRATION_REQUEST_PORT() < 1 ||
|
||||||
|
GET_AUTOCALIBRATION_REQUEST_PORT() > 65535)
|
||||||
|
{
|
||||||
|
if (GET_VERBOSE())
|
||||||
|
fprintf(stderr, "Warning! Bad autocalibration_request_port:"
|
||||||
|
" failing back to the default value.\n") ;
|
||||||
|
SET_AUTOCALIBRATION_REQUEST_PORT(DEFAULT_AUTOCALIBRATION_REQUEST_PORT) ;
|
||||||
|
}
|
||||||
|
if (GET_AUTOCALIBRATION_PORT() < 1 ||
|
||||||
|
GET_AUTOCALIBRATION_PORT() > 65535)
|
||||||
|
{
|
||||||
|
if (GET_VERBOSE())
|
||||||
|
fprintf(stderr, "Warning! Bad autocalibration_port:"
|
||||||
|
" failing back to the default value.\n") ;
|
||||||
|
SET_AUTOCALIBRATION_PORT(DEFAULT_AUTOCALIBRATION_PORT) ;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue