summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/UdpTransceiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/UdpTransceiver.cpp')
-rw-r--r--cpp/src/Ice/UdpTransceiver.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/cpp/src/Ice/UdpTransceiver.cpp b/cpp/src/Ice/UdpTransceiver.cpp
index 9e7af7bc5ad..6ee05d8d2b6 100644
--- a/cpp/src/Ice/UdpTransceiver.cpp
+++ b/cpp/src/Ice/UdpTransceiver.cpp
@@ -128,15 +128,15 @@ IceInternal::UdpTransceiver::read(Buffer& buf, int)
const int packetSize = min(_maxPacketSize, _rcvSize - _udpOverhead);
if(packetSize < static_cast<int>(buf.b.size()))
{
- //
- // We log a warning here because this is the server side -- without the
- // the warning, there would only be silence.
- //
- if(_warn)
- {
- Warning out(_logger);
- out << "DatagramLimitException: maximum size of " << packetSize << " exceeded";
- }
+ //
+ // We log a warning here because this is the server side -- without the
+ // the warning, there would only be silence.
+ //
+ if(_warn)
+ {
+ Warning out(_logger);
+ out << "DatagramLimitException: maximum size of " << packetSize << " exceeded";
+ }
throw Ice::DatagramLimitException(__FILE__, __LINE__);
}
buf.b.resize(packetSize);
@@ -261,7 +261,8 @@ IceInternal::UdpTransceiver::UdpTransceiver(const InstancePtr& instance, const s
_traceLevels(instance->traceLevels()),
_logger(instance->logger()),
_incoming(false),
- _connect(true)
+ _connect(true),
+ _warn(instance->properties()->getPropertyAsInt("Ice.Warn.Datagrams") > 0)
{
try
{