diff options
author | Benoit Foucher <benoit@zeroc.com> | 2014-12-17 18:06:54 +0100 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2014-12-17 18:06:54 +0100 |
commit | 5a57686d2ccbb085b8ac67908ad9525a6bafaf4b (patch) | |
tree | 58c2219412e8af66fbfd66d5269af6b7a48b28d2 /cpp/src/Ice/ConnectionI.cpp | |
parent | Avoid check_output isn't supported with python 2.6 (diff) | |
download | ice-5a57686d2ccbb085b8ac67908ad9525a6bafaf4b.tar.bz2 ice-5a57686d2ccbb085b8ac67908ad9525a6bafaf4b.tar.xz ice-5a57686d2ccbb085b8ac67908ad9525a6bafaf4b.zip |
Fixed ICE-6199 - changed collocation optimization to call AMI cb asynchronously if AMD dispatch
Diffstat (limited to 'cpp/src/Ice/ConnectionI.cpp')
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index ddcbea13f11..e583913e5a0 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -1477,7 +1477,7 @@ Ice::ConnectionI::asyncRequestCanceled(const OutgoingAsyncBasePtr& outAsync, con } void -Ice::ConnectionI::sendResponse(Int, BasicStream* os, Byte compressFlag) +Ice::ConnectionI::sendResponse(Int, BasicStream* os, Byte compressFlag, bool /*amd*/) { IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); assert(_state > StateNotValidated); @@ -1550,11 +1550,37 @@ Ice::ConnectionI::sendNoResponse() } bool -Ice::ConnectionI::systemException(Int, const SystemException&) +Ice::ConnectionI::systemException(Int, const SystemException&, bool /*amd*/) { return false; // System exceptions aren't marshalled. } +void +Ice::ConnectionI::invokeException(Ice::Int, const LocalException& ex, int invokeNum, bool /*amd*/) +{ + // + // Fatal exception while invoking a request. Since sendResponse/sendNoResponse isn't + // called in case of a fatal exception we decrement _dispatchCount here. + // + + IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); + setState(StateClosed, ex); + + if(invokeNum > 0) + { + assert(_dispatchCount >= invokeNum); + _dispatchCount -= invokeNum; + if(_dispatchCount == 0) + { + if(_state == StateFinished) + { + reap(); + } + notifyAll(); + } + } +} + EndpointIPtr Ice::ConnectionI::endpoint() const { @@ -2359,32 +2385,6 @@ Ice::ConnectionI::exception(const LocalException& ex) setState(StateClosed, ex); } -void -Ice::ConnectionI::invokeException(Ice::Int, const LocalException& ex, int invokeNum) -{ - // - // Fatal exception while invoking a request. Since sendResponse/sendNoResponse isn't - // called in case of a fatal exception we decrement _dispatchCount here. - // - - IceUtil::Monitor<IceUtil::Mutex>::Lock sync(*this); - setState(StateClosed, ex); - - if(invokeNum > 0) - { - assert(_dispatchCount >= invokeNum); - _dispatchCount -= invokeNum; - if(_dispatchCount == 0) - { - if(_state == StateFinished) - { - reap(); - } - notifyAll(); - } - } -} - Ice::ConnectionI::ConnectionI(const CommunicatorPtr& communicator, const InstancePtr& instance, const ACMMonitorPtr& monitor, @@ -3708,7 +3708,7 @@ Ice::ConnectionI::invokeAll(BasicStream& stream, Int invokeNum, Int requestId, B } catch(const LocalException& ex) { - invokeException(requestId, ex, invokeNum); // Fatal invocation exception + invokeException(requestId, ex, invokeNum, false); // Fatal invocation exception } } |