diff options
author | Benoit Foucher <benoit@zeroc.com> | 2012-08-06 09:56:04 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2012-08-06 09:56:04 +0200 |
commit | c1e8bda5abc33ae40e3603c1a3fb6ba8645780a0 (patch) | |
tree | cf400743403ef2703a24b5044ab49c5e2385baf5 /cpp/src/Ice/Outgoing.cpp | |
parent | Fixes (diff) | |
download | ice-c1e8bda5abc33ae40e3603c1a3fb6ba8645780a0.tar.bz2 ice-c1e8bda5abc33ae40e3603c1a3fb6ba8645780a0.tar.xz ice-c1e8bda5abc33ae40e3603c1a3fb6ba8645780a0.zip |
Updates
Diffstat (limited to 'cpp/src/Ice/Outgoing.cpp')
-rw-r--r-- | cpp/src/Ice/Outgoing.cpp | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/cpp/src/Ice/Outgoing.cpp b/cpp/src/Ice/Outgoing.cpp index 914b84f4708..e5b0e833de7 100644 --- a/cpp/src/Ice/Outgoing.cpp +++ b/cpp/src/Ice/Outgoing.cpp @@ -98,10 +98,10 @@ IceInternal::Outgoing::Outgoing(RequestHandler* handler, const string& operation { try { - _observer = resolver->getInvocationObserver(ref->getInstance()->proxyFactory()->referenceToProxy(ref), - operation, - *context, - handler->getConnection(false)); + _observer.attach(resolver->getInvocationObserver(ref->getInstance()->proxyFactory()->referenceToProxy(ref), + operation, + *context, + handler->getConnection(false))); } catch(const Ice::LocalException&) { @@ -110,11 +110,6 @@ IceInternal::Outgoing::Outgoing(RequestHandler* handler, const string& operation // the request will be re-tried in this case. // } - - if(_observer) - { - _observer->attach(); - } } switch(ref->getMode()) @@ -188,10 +183,6 @@ IceInternal::Outgoing::Outgoing(RequestHandler* handler, const string& operation Outgoing::~Outgoing() { - if(_observer) - { - _observer->detach(); - } } bool @@ -404,20 +395,12 @@ IceInternal::Outgoing::finished(BasicStream& is) { case replyOK: { - if(_observer) - { - _observer->responseOK(); - } _state = StateOK; // The state must be set last, in case there is an exception. break; } case replyUserException: { - if(_observer) - { - _observer->responseUserException(); - } _state = StateUserException; // The state must be set last, in case there is an exception. break; } @@ -426,11 +409,6 @@ IceInternal::Outgoing::finished(BasicStream& is) case replyFacetNotExist: case replyOperationNotExist: { - if(_observer) - { - _observer->responseRequestFailedException(); - } - // // Don't read the exception members directly into the // exception. Otherwise if reading fails and raises an @@ -499,11 +477,6 @@ IceInternal::Outgoing::finished(BasicStream& is) case replyUnknownLocalException: case replyUnknownUserException: { - if(_observer) - { - _observer->responseUnknownException(); - } - // // Don't read the exception members directly into the // exception. Otherwise if reading fails and raises an @@ -550,10 +523,6 @@ IceInternal::Outgoing::finished(BasicStream& is) default: { - if(_observer) - { - _observer->responseUnknownException(); - } _exception.reset(new UnknownReplyStatusException(__FILE__, __LINE__)); _state = StateLocalException; break; |