diff options
author | Marc Laukien <marc@zeroc.com> | 2004-11-04 16:06:19 +0000 |
---|---|---|
committer | Marc Laukien <marc@zeroc.com> | 2004-11-04 16:06:19 +0000 |
commit | 868cff81088be699f99eada9dfecb5b7e5bfd094 (patch) | |
tree | d242602cc7bc943991cbb4979a6277991724479a /cpp/src | |
parent | revising icepackadmin command (diff) | |
download | ice-868cff81088be699f99eada9dfecb5b7e5bfd094.tar.bz2 ice-868cff81088be699f99eada9dfecb5b7e5bfd094.tar.xz ice-868cff81088be699f99eada9dfecb5b7e5bfd094.zip |
glacier fix
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Glacier2/RequestQueue.cpp | 33 | ||||
-rw-r--r-- | cpp/src/Glacier2/RequestQueue.h | 1 |
2 files changed, 19 insertions, 15 deletions
diff --git a/cpp/src/Glacier2/RequestQueue.cpp b/cpp/src/Glacier2/RequestQueue.cpp index 002d0979f80..44e4a494c94 100644 --- a/cpp/src/Glacier2/RequestQueue.cpp +++ b/cpp/src/Glacier2/RequestQueue.cpp @@ -22,6 +22,17 @@ Glacier2::Request::Request(const ObjectPrx& proxy, const vector<Byte>& inParams, _forwardContext(forwardContext), _amdCB(amdCB) { + // + // If this is not a twoway call, we can finish the AMD call right + // away. + // + if(!_proxy->ice_isTwoway()) + { + bool ok = true; + vector<Byte> outParams; + _amdCB->ice_response(ok, outParams); + } + Context::const_iterator p = current.ctx.find("_ovrd"); if(p != current.ctx.end()) { @@ -46,25 +57,20 @@ Glacier2::Request::invoke() ok = _proxy->ice_invoke(_current.operation, _current.mode, _inParams, outParams); } - _amdCB->ice_response(ok, outParams); + if(_proxy->ice_isTwoway()) + { + _amdCB->ice_response(ok, outParams); + } } catch(const LocalException& ex) { - _amdCB->ice_exception(ex); + if(_proxy->ice_isTwoway()) + { + _amdCB->ice_exception(ex); + } } } -void -Glacier2::Request::abort() -{ - // - // Abort the call with a dummy response. - // - bool ok = true; - vector<Byte> outParams; - _amdCB->ice_response(ok, outParams); -} - bool Glacier2::Request::override(const RequestPtr& other) const { @@ -157,7 +163,6 @@ Glacier2::RequestQueue::addRequest(const RequestPtr& request) // if(request->override(*p)) { - (*p)->abort(); *p = request; return true; } diff --git a/cpp/src/Glacier2/RequestQueue.h b/cpp/src/Glacier2/RequestQueue.h index bdb9b0dec68..949e001cf5d 100644 --- a/cpp/src/Glacier2/RequestQueue.h +++ b/cpp/src/Glacier2/RequestQueue.h @@ -28,7 +28,6 @@ public: const Ice::AMD_Object_ice_invokePtr&); void invoke(); - void abort(); bool override(const RequestPtr&) const; const Ice::ObjectPrx& getProxy() const; |