summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/OutgoingAsync.cpp
diff options
context:
space:
mode:
authorBenoit Foucher <benoit@zeroc.com>2014-10-01 16:32:16 +0200
committerBenoit Foucher <benoit@zeroc.com>2014-10-01 16:32:16 +0200
commit2063204f644284eee4683faf017a86459baccb03 (patch)
treec243027f28ca2ede63c78a9037e67f88a5376a5f /cpp/src/Ice/OutgoingAsync.cpp
parentICE-5656 java test/Ice/exception eats all error messages (diff)
downloadice-2063204f644284eee4683faf017a86459baccb03.tar.bz2
ice-2063204f644284eee4683faf017a86459baccb03.tar.xz
ice-2063204f644284eee4683faf017a86459baccb03.zip
Lots of minor fixes, few simplifications to OutgoingAsync code
Diffstat (limited to 'cpp/src/Ice/OutgoingAsync.cpp')
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp58
1 files changed, 18 insertions, 40 deletions
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index f0cabc87b3c..fb57965b60f 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -618,26 +618,6 @@ IceInternal::OutgoingAsync::__finished(const Ice::Exception& exc)
}
void
-IceInternal::OutgoingAsync::__processRetry(bool destroyed)
-{
- if(destroyed)
- {
- __invokeExceptionAsync(CommunicatorDestroyedException(__FILE__, __LINE__));
- }
- else
- {
- try
- {
- __invoke(false);
- }
- catch(const Ice::LocalException& ex)
- {
- __invokeExceptionAsync(ex);
- }
- }
-}
-
-void
IceInternal::OutgoingAsync::__invokeExceptionAsync(const Ice::Exception& ex)
{
if((_state & Done) == 0 && _handler)
@@ -656,6 +636,12 @@ IceInternal::OutgoingAsync::__invokeExceptionAsync(const Ice::Exception& ex)
AsyncResult::__invokeExceptionAsync(ex);
}
+void
+IceInternal::OutgoingAsync::__processRetry()
+{
+ __invoke(false);
+}
+
bool
IceInternal::OutgoingAsync::__finished()
{
@@ -850,7 +836,7 @@ IceInternal::OutgoingAsync::__finished()
}
bool
-IceInternal::OutgoingAsync::__invoke(bool synchronous)
+IceInternal::OutgoingAsync::__invoke(bool userThread)
{
const Reference::Mode mode = _proxy->__reference()->getMode();
if(mode == Reference::ModeBatchOneway || mode == Reference::ModeBatchDatagram)
@@ -870,7 +856,7 @@ IceInternal::OutgoingAsync::__invoke(bool synchronous)
AsyncStatus status = _handler->sendAsyncRequest(this);
if(status & AsyncStatusSent)
{
- if(synchronous)
+ if(userThread)
{
_sentSynchronously = true;
if(status & AsyncStatusInvokeSentCallback)
@@ -1007,9 +993,9 @@ IceInternal::BatchOutgoingAsync::__finished(const Ice::Exception& exc)
}
void
-IceInternal::BatchOutgoingAsync::__processRetry(bool destroyed)
+IceInternal::BatchOutgoingAsync::__processRetry()
{
- // Does not support retry
+ assert(false); // Retries are never scheduled
}
IceInternal::ProxyBatchOutgoingAsync::ProxyBatchOutgoingAsync(const Ice::ObjectPrx& proxy,
@@ -1200,6 +1186,12 @@ IceInternal::CommunicatorBatchOutgoingAsync::ready()
}
void
+IceInternal::CommunicatorBatchOutgoingAsync::__processRetry()
+{
+ assert(false); // Retries are never scheduled
+}
+
+void
IceInternal::CommunicatorBatchOutgoingAsync::check(bool userThread)
{
{
@@ -1313,23 +1305,9 @@ IceInternal::GetConnectionOutgoingAsync::__finished(const Ice::Exception& exc)
}
void
-IceInternal::GetConnectionOutgoingAsync::__processRetry(bool destroyed)
+IceInternal::GetConnectionOutgoingAsync::__processRetry()
{
- if(destroyed)
- {
- __invokeExceptionAsync(CommunicatorDestroyedException(__FILE__, __LINE__));
- }
- else
- {
- try
- {
- __invoke();
- }
- catch(const Ice::LocalException& ex)
- {
- __invokeExceptionAsync(ex);
- }
- }
+ __invoke();
}
void