diff options
author | Marc Laukien <marc@zeroc.com> | 2002-08-28 21:21:06 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2002-08-28 21:21:06 +0000 |
commit | dfa87a37643a0dc76ac590af86a59ba7e98509ac (patch) | |
tree | ec63121861f9ab287ed82bb8e5362a7bbadcd361 /cpp/src/Ice/Connection.cpp | |
parent | cleanup; dynamic factory loading (diff) | |
download | ice-dfa87a37643a0dc76ac590af86a59ba7e98509ac.tar.bz2 ice-dfa87a37643a0dc76ac590af86a59ba7e98509ac.tar.xz ice-dfa87a37643a0dc76ac590af86a59ba7e98509ac.zip |
some cleanup
Diffstat (limited to 'cpp/src/Ice/Connection.cpp')
-rw-r--r-- | cpp/src/Ice/Connection.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/cpp/src/Ice/Connection.cpp b/cpp/src/Ice/Connection.cpp index 5aecbe9b1a8..eaad513e59e 100644 --- a/cpp/src/Ice/Connection.cpp +++ b/cpp/src/Ice/Connection.cpp @@ -807,6 +807,7 @@ IceInternal::Connection::Connection(const InstancePtr& instance, _logger(_instance->logger()), _traceLevels(_instance->traceLevels()), _defaultsAndOverrides(_instance->defaultsAndOverrides()), + _warn(_instance->properties()->getPropertyAsInt("Ice.ConnectionWarnings") > 0), _nextRequestId(1), _requestsHint(_requests.end()), _batchStream(_instance), @@ -815,8 +816,6 @@ IceInternal::Connection::Connection(const InstancePtr& instance, _state(StateHolding), _registeredWithPool(false) { - _warn = _instance->properties()->getPropertyAsInt("Ice.ConnectionWarnings") > 0; - if(_endpoint->datagram()) { // @@ -1034,7 +1033,7 @@ IceInternal::Connection::setState(State state) } void -IceInternal::Connection::validateConnection() +IceInternal::Connection::validateConnection() const { BasicStream os(_instance); os.write(protocolVersion); @@ -1047,7 +1046,7 @@ IceInternal::Connection::validateConnection() } void -IceInternal::Connection::closeConnection() +IceInternal::Connection::closeConnection() const { BasicStream os(_instance); os.write(protocolVersion); @@ -1071,18 +1070,18 @@ IceInternal::Connection::registerWithPool() { if(_adapter) { - if(!_serverThreadPool) + if(!_serverThreadPool) // Lazy initialization. { - _serverThreadPool = _instance->serverThreadPool(); + const_cast<ThreadPoolPtr&>(_serverThreadPool) = _instance->serverThreadPool(); assert(_serverThreadPool); } _serverThreadPool->_register(_transceiver->fd(), this); } else { - if(!_clientThreadPool) + if(!_clientThreadPool) // Lazy initialization. { - _clientThreadPool = _instance->clientThreadPool(); + const_cast<ThreadPoolPtr&>(_clientThreadPool) = _instance->clientThreadPool(); assert(_clientThreadPool); } _clientThreadPool->_register(_transceiver->fd(), this); |