summaryrefslogtreecommitdiff
path: root/TAO/tao/Messaging
diff options
context:
space:
mode:
authormcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2014-11-07 10:16:31 +0000
committermcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2014-11-07 10:16:31 +0000
commit165c7055de6b0e6319a8a8c66e3440588da52bfe (patch)
tree03998934f267847597826492a3d9e788ae2a4f85 /TAO/tao/Messaging
parentecfa674f8a7d54de63b74c4c58cf4512999c0a24 (diff)
downloadATCD-165c7055de6b0e6319a8a8c66e3440588da52bfe.tar.gz
ChangelogTag: Fri Nov 7 10:01:43 UTC 2014 Martin Corino <mcorino@remedy.nl>
Diffstat (limited to 'TAO/tao/Messaging')
-rw-r--r--TAO/tao/Messaging/Asynch_Invocation.cpp94
-rw-r--r--TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp3
2 files changed, 52 insertions, 45 deletions
diff --git a/TAO/tao/Messaging/Asynch_Invocation.cpp b/TAO/tao/Messaging/Asynch_Invocation.cpp
index db7a892ab72..e61f37067f0 100644
--- a/TAO/tao/Messaging/Asynch_Invocation.cpp
+++ b/TAO/tao/Messaging/Asynch_Invocation.cpp
@@ -66,51 +66,55 @@ namespace TAO
transport->output_cdr_lock (), TAO_INVOKE_FAILURE);
TAO_OutputCDR & cdr =
- this->resolver_.transport ()->messaging_object ()->out_stream ();
-
- // Oneway semantics. See comments for below send_message()
- // call.
- cdr.message_attributes (this->details_.request_id (),
- this->resolver_.stub (),
- TAO_Message_Semantics (TAO_Message_Semantics::TAO_ONEWAY_REQUEST,
- TAO_Message_Semantics::TAO_ASYNCH_CALLBACK),
- max_wait_time);
-
- this->write_header (cdr);
-
- this->marshal_data (cdr);
-
- // Register a reply dispatcher for this invocation. Use the
- // preallocated reply dispatcher.
- TAO_Bind_Dispatcher_Guard dispatch_guard (
- this->details_.request_id (),
- this->safe_rd_.get (),
- transport->tms ());
-
- // Now that we have bound the reply dispatcher to the map, just
- // loose ownership of the reply dispatcher.
- this->safe_rd_.release ();
-
- if (dispatch_guard.status () != 0)
- {
- // @@ What is the right way to handle this error? Do we need
- // to call the interceptors in this case?
- throw ::CORBA::INTERNAL (TAO::VMCID, CORBA::COMPLETED_NO);
- }
-
- // Do not unbind during destruction. We need the entry to be
- // there in the map since the reply dispatcher depends on
- // that. This is also a trigger to loose the ownership of the
- // reply dispatcher.
- dispatch_guard.status (TAO_Bind_Dispatcher_Guard::NO_UNBIND);
-
- // Send it as a oneway request. It will make all the required
- // paraphernalia within the ORB to fire, like buffering if
- // send blocks etc.
- s = this->send_message (cdr,
- TAO_Message_Semantics (TAO_Message_Semantics::TAO_ONEWAY_REQUEST,
- TAO_Message_Semantics::TAO_ASYNCH_CALLBACK),
- max_wait_time);
+ this->resolver_.transport ()->out_stream ();
+
+ {
+ CDR_Byte_Order_Guard cdr_guard (cdr, this->_tao_byte_order ());
+
+ // Oneway semantics. See comments for below send_message()
+ // call.
+ cdr.message_attributes (this->details_.request_id (),
+ this->resolver_.stub (),
+ TAO_Message_Semantics (TAO_Message_Semantics::TAO_ONEWAY_REQUEST,
+ TAO_Message_Semantics::TAO_ASYNCH_CALLBACK),
+ max_wait_time);
+
+ this->write_header (cdr);
+
+ this->marshal_data (cdr);
+
+ // Register a reply dispatcher for this invocation. Use the
+ // preallocated reply dispatcher.
+ TAO_Bind_Dispatcher_Guard dispatch_guard (
+ this->details_.request_id (),
+ this->safe_rd_.get (),
+ transport->tms ());
+
+ // Now that we have bound the reply dispatcher to the map, just
+ // loose ownership of the reply dispatcher.
+ this->safe_rd_.release ();
+
+ if (dispatch_guard.status () != 0)
+ {
+ // @@ What is the right way to handle this error? Do we need
+ // to call the interceptors in this case?
+ throw ::CORBA::INTERNAL (TAO::VMCID, CORBA::COMPLETED_NO);
+ }
+
+ // Do not unbind during destruction. We need the entry to be
+ // there in the map since the reply dispatcher depends on
+ // that. This is also a trigger to loose the ownership of the
+ // reply dispatcher.
+ dispatch_guard.status (TAO_Bind_Dispatcher_Guard::NO_UNBIND);
+
+ // Send it as a oneway request. It will make all the required
+ // paraphernalia within the ORB to fire, like buffering if
+ // send blocks etc.
+ s = this->send_message (cdr,
+ TAO_Message_Semantics (TAO_Message_Semantics::TAO_ONEWAY_REQUEST,
+ TAO_Message_Semantics::TAO_ASYNCH_CALLBACK),
+ max_wait_time);
+ } // CDR_Byte_Order_Guard
ace_mon.release();
diff --git a/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp b/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
index 5a760c4b7e2..ca52ada01e4 100644
--- a/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
+++ b/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
@@ -189,6 +189,9 @@ namespace TAO
op,
this->safe_rd_.release ());
+ // forward requested byte order
+ asynch._tao_byte_order (this->_tao_byte_order ());
+
Invocation_Status const s = asynch.remote_invocation (max_wait_time);
if (s == TAO_INVOKE_RESTART &&