diff options
author | Michi Henning <michi@zeroc.com> | 2003-07-30 03:09:01 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2003-07-30 03:09:01 +0000 |
commit | 61924a00ce03e089df17fbecba1e11815bec32d9 (patch) | |
tree | 2f423907f83c50da173eeaa850ef31e056beacb2 /cpp/src/Ice/Connection.cpp | |
parent | gcc fixes for Win32 changes (diff) | |
download | ice-61924a00ce03e089df17fbecba1e11815bec32d9.tar.bz2 ice-61924a00ce03e089df17fbecba1e11815bec32d9.tar.xz ice-61924a00ce03e089df17fbecba1e11815bec32d9.zip |
Updated receiving side for DatagramLimitException. Test is now done in
ThreadPool, as it should have been all along.
Diffstat (limited to 'cpp/src/Ice/Connection.cpp')
-rw-r--r-- | cpp/src/Ice/Connection.cpp | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/cpp/src/Ice/Connection.cpp b/cpp/src/Ice/Connection.cpp index c9970afbcc9..264fb7fffff 100644 --- a/cpp/src/Ice/Connection.cpp +++ b/cpp/src/Ice/Connection.cpp @@ -906,6 +906,12 @@ IceInternal::Connection::getAdapter() const } bool +IceInternal::Connection::datagram() const +{ + return _endpoint->datagram(); +} + +bool IceInternal::Connection::readable() const { return true; @@ -1020,23 +1026,6 @@ IceInternal::Connection::message(BasicStream& stream, const ThreadPoolPtr& threa stream.b.swap(ustream.b); } - if(_endpoint->datagram()) - { - Int messageSize; - stream.read(messageSize); - if(messageSize > _maxRecvSize) // Truncated datagram - { - DatagramLimitException ex(__FILE__, __LINE__); - ex.maxSize = _maxRecvSize; - if(_warnUdp) - { - Warning out(_logger); - out << "datagram exception:\n" << ex << '\n' << _transceiver->toString(); - } - throw ex; - } - } - stream.i = stream.b.begin() + headerSize; switch(messageType) @@ -1344,8 +1333,7 @@ IceInternal::Connection::Connection(const InstancePtr& instance, _batchRequestNum(0), _dispatchCount(0), _proxyCount(0), - _state(StateNotValidated), - _maxRecvSize(transceiver->maxRecvSize()) + _state(StateNotValidated) { if(_adapter) { |