diff options
author | Benoit Foucher <benoit@zeroc.com> | 2007-12-05 15:09:18 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2007-12-05 15:09:18 +0100 |
commit | 5124965c25862fa450509beddfa7266effacddfd (patch) | |
tree | 6b1cb4b983eb36d6b4d7c4ebeb7687b1832318ca /cpp/src/Ice/ConnectRequestHandler.cpp | |
parent | Added support for service commands to icegridadmin (bug 1775) (diff) | |
download | ice-5124965c25862fa450509beddfa7266effacddfd.tar.bz2 ice-5124965c25862fa450509beddfa7266effacddfd.tar.xz ice-5124965c25862fa450509beddfa7266effacddfd.zip |
Fixed NPE in the outgoing connection factory
Diffstat (limited to 'cpp/src/Ice/ConnectRequestHandler.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectRequestHandler.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/src/Ice/ConnectRequestHandler.cpp b/cpp/src/Ice/ConnectRequestHandler.cpp index f306b6c26b6..8e04d74512e 100644 --- a/cpp/src/Ice/ConnectRequestHandler.cpp +++ b/cpp/src/Ice/ConnectRequestHandler.cpp @@ -226,6 +226,7 @@ ConnectRequestHandler::setConnection(const Ice::ConnectionIPtr& connection, bool { { Lock sync(*this); + assert(!_exception.get() && !_connection); _connection = connection; _compress = compress; } @@ -251,6 +252,7 @@ ConnectRequestHandler::setException(const Ice::LocalException& ex) { { Lock sync(*this); + assert(!_initialized && !_exception.get()); _exception.reset(dynamic_cast<Ice::LocalException*>(ex.ice_clone())); _proxy = 0; // Break cyclic reference count. _delegate = 0; // Break cyclic reference count. @@ -316,7 +318,7 @@ ConnectRequestHandler::flushRequests() { { Lock sync(*this); - assert(_connection); + assert(_connection && !_initialized); while(_batchRequestInProgress) { @@ -396,6 +398,7 @@ ConnectRequestHandler::flushRequests() { Lock sync(*this); + assert(!_initialized); _initialized = true; _flushing = false; notifyAll(); |