summaryrefslogtreecommitdiff
path: root/TAO/tao/Messaging/Asynch_Invocation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Messaging/Asynch_Invocation.cpp')
-rw-r--r--TAO/tao/Messaging/Asynch_Invocation.cpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/TAO/tao/Messaging/Asynch_Invocation.cpp b/TAO/tao/Messaging/Asynch_Invocation.cpp
index 0f986e5b769..4444cb1b7e7 100644
--- a/TAO/tao/Messaging/Asynch_Invocation.cpp
+++ b/TAO/tao/Messaging/Asynch_Invocation.cpp
@@ -41,21 +41,16 @@ namespace TAO
this->init_target_spec (tspec ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
- TAO_OutputCDR &cdr =
- this->resolver_.transport ()->messaging_object ()->out_stream ();
-
Invocation_Status s = TAO_INVOKE_FAILURE;
+#if TAO_HAS_INTERCEPTORS == 1
+ s =
+ this->send_request_interception (ACE_ENV_SINGLE_ARG_PARAMETER);
+ ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
- this->write_header (tspec,
- cdr
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (s);
-
- this->marshal_data (cdr
- ACE_ENV_ARG_PARAMETER);
- ACE_CHECK_RETURN (s);
-
+ if (s != TAO_INVOKE_SUCCESS)
+ return s;
+#endif /*TAO_HAS_INTERCEPTORS */
// Register a reply dispatcher for this invocation. Use the
// preallocated reply dispatcher.
TAO_Bind_Dispatcher_Guard dispatch_guard (
@@ -82,20 +77,23 @@ namespace TAO
// reply dispatcher.
dispatch_guard.status (TAO_Bind_Dispatcher_Guard::NO_UNBIND);
-#if TAO_HAS_INTERCEPTORS == 1
- s =
- this->send_request_interception (ACE_ENV_SINGLE_ARG_PARAMETER);
- ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
-
- if (s != TAO_INVOKE_SUCCESS)
- return s;
-#endif /*TAO_HAS_INTERCEPTORS */
+ TAO_OutputCDR &cdr =
+ this->resolver_.transport ()->messaging_object ()->out_stream ();
// We have started the interception flow. We need to call the
// ending interception flow if things go wrong. The purpose of the
// try block is to take care of the cases when things go wrong.
ACE_TRY
{
+ this->write_header (tspec,
+ cdr
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
+ this->marshal_data (cdr
+ ACE_ENV_ARG_PARAMETER);
+ ACE_TRY_CHECK;
+
// Send it as a oneway request. It will make all the required
// paraphernalia within the ORB to fire, like buffering if
// send blocks etc.