fixed and improved ui
This commit is contained in:
@@ -18,6 +18,10 @@
|
||||
|
||||
namespace MARTe {
|
||||
|
||||
/* Out-of-line definitions for class-scope static const members that are
|
||||
* ODR-used (e.g. passed through varargs in REPORT_ERROR). */
|
||||
const uint32 UDPSServer::UDPS_SERVER_MAX_UDP_PAYLOAD;
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Constructor / Destructor
|
||||
// ---------------------------------------------------------------------------
|
||||
@@ -88,6 +92,16 @@ bool UDPSServer::Initialise(StructuredDataI &data) {
|
||||
|
||||
uint32 mps = UDPS_SERVER_DEFAULT_MAX_PAYLOAD;
|
||||
(void)data.Read("MaxPayloadSize", mps);
|
||||
/* A payload larger than the largest legal UDP datagram cannot be sent —
|
||||
* sendto would fail with EMSGSIZE and the whole cycle would be dropped. */
|
||||
if (mps > UDPS_SERVER_MAX_UDP_PAYLOAD) {
|
||||
REPORT_ERROR_STATIC(ErrorManagement::Warning,
|
||||
"UDPSServer: MaxPayloadSize %u exceeds the UDP datagram "
|
||||
"limit (%u); clamping to %u.",
|
||||
mps, UDPS_SERVER_MAX_UDP_PAYLOAD,
|
||||
UDPS_SERVER_MAX_UDP_PAYLOAD);
|
||||
mps = UDPS_SERVER_MAX_UDP_PAYLOAD;
|
||||
}
|
||||
maxPayloadSize = mps;
|
||||
|
||||
uint32 timeoutSecs = UDPS_SERVER_DEFAULT_CLIENT_TIMEOUT_S;
|
||||
|
||||
Reference in New Issue
Block a user