diff options
Diffstat (limited to 'cppe')
-rw-r--r-- | cppe/include/IceE/Outgoing.h | 2 | ||||
-rwxr-xr-x | cppe/src/IceE/Connection.cpp | 2 | ||||
-rw-r--r-- | cppe/src/IceE/Outgoing.cpp | 17 |
3 files changed, 13 insertions, 8 deletions
diff --git a/cppe/include/IceE/Outgoing.h b/cppe/include/IceE/Outgoing.h index 554bcce0ce2..6bfcf548206 100644 --- a/cppe/include/IceE/Outgoing.h +++ b/cppe/include/IceE/Outgoing.h @@ -61,8 +61,8 @@ public: void abort(const Ice::LocalException&); #ifndef ICEE_PURE_BLOCKING_CLIENT void finished(BasicStream&); -#endif void finished(const Ice::LocalException&); +#endif // Inlined for speed optimization. BasicStream* is() { return &_is; } diff --git a/cppe/src/IceE/Connection.cpp b/cppe/src/IceE/Connection.cpp index 239b0e62771..e535956b6f2 100755 --- a/cppe/src/IceE/Connection.cpp +++ b/cppe/src/IceE/Connection.cpp @@ -424,7 +424,7 @@ Ice::Connection::sendBlockingRequest(BasicStream* os, BasicStream* is, Outgoing* } _transceiver = 0; - out->finished(*_exception.get()); + _exception->ice_throw(); } } } diff --git a/cppe/src/IceE/Outgoing.cpp b/cppe/src/IceE/Outgoing.cpp index 7351c231ca6..dda1f5ee1e3 100644 --- a/cppe/src/IceE/Outgoing.cpp +++ b/cppe/src/IceE/Outgoing.cpp @@ -200,11 +200,16 @@ IceInternal::Outgoing::invoke() // For blocking sends the reply is written directly // into the incoming stream. // - _connection->sendBlockingRequest(&_os, &_is, this); - if(!_exception.get()) + try { + _connection->sendBlockingRequest(&_os, &_is, this); finishedInternal(); } + catch(const LocalException& ex) + { + _state = StateLocalException; + _exception.reset(dynamic_cast<LocalException*>(ex.ice_clone())); + } } #endif if(_exception.get()) @@ -486,12 +491,12 @@ IceInternal::Outgoing::finishedInternal() } } +#ifndef ICEE_PURE_BLOCKING_CLIENT + void IceInternal::Outgoing::finished(const LocalException& ex) { -#ifndef ICEE_PURE_BLOCKING_CLIENT IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); -#endif assert(_reference->getMode() == Reference::ModeTwoway); // Can only be called for twoways. @@ -499,7 +504,7 @@ IceInternal::Outgoing::finished(const LocalException& ex) _state = StateLocalException; _exception.reset(dynamic_cast<LocalException*>(ex.ice_clone())); -#ifndef ICEE_PURE_BLOCKING_CLIENT notify(); -#endif } + +#endif |