summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp')
-rw-r--r--cpp/src/Glacier2/RequestQueue.cpp33
-rw-r--r--cpp/src/Glacier2/RequestQueue.h1
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;