From 5b645c8a1b795578080fdff60e987ab95282a046 Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Fri, 15 Apr 2005 13:46:13 +0000 Subject: ChangeLogTag: Fri Apr 15 14:34:12 UTC 2005 Johnny Willemsen --- TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp | 22 +++++++------- TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp | 19 +++++++------ TAO/tao/IIOP_Transport.cpp | 38 ++++++++++--------------- TAO/tao/Strategies/SCIOP_Transport.cpp | 18 ++++++------ TAO/tao/operation_details.h | 5 +--- TAO/tao/operation_details.i | 14 --------- 6 files changed, 49 insertions(+), 67 deletions(-) diff --git a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp index cef6698b219..5b3ae3b4f74 100644 --- a/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp +++ b/TAO/orbsvcs/orbsvcs/HTIOP/HTIOP_Transport.cpp @@ -90,8 +90,8 @@ TAO::HTIOP::Transport::send (iovec *iov, int iovcnt, ssize_t TAO::HTIOP::Transport::recv (char *buf, - size_t len, - const ACE_Time_Value *max_wait_time) + size_t len, + const ACE_Time_Value *max_wait_time) { ssize_t n = this->connection_handler_->peer ().recv (buf, len, @@ -253,14 +253,16 @@ TAO::HTIOP::Transport::generate_request_header (TAO_Operation_Details &opdetails { this->set_bidir_context_info (opdetails); - // Set the flag to 0 (i.e., originating side) - this->bidirectional_flag (0); - } - - // Modify the request id if we have BiDirectional client/server - // setup - opdetails.modify_request_id (this->bidirectional_flag ()); + // Set the flag to 1 (i.e., originating side) + this->bidirectional_flag (1); + // At the moment we enable BiDIR giop we have to get a new + // request id to make sure that we follow the even/odd rule + // for request id's. We only need to do this when enabled + // it, after that the Transport Mux Strategy will make sure + // that the rule is followed + opdetails.request_id (this->tms ()->request_id ()); + } return TAO_Transport::generate_request_header (opdetails, spec, @@ -293,7 +295,7 @@ TAO::HTIOP::Transport::tear_listen_point_list (TAO_InputCDR &cdr) // As we have received a bidirectional information, set the flag to // 1 (i.e., non-originating side) - this->bidirectional_flag (1); + this->bidirectional_flag (0); // Just make sure that the connection handler is sane before we go // head and do anything with it. diff --git a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp index c3a337419e8..4912eb917b9 100644 --- a/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp +++ b/TAO/orbsvcs/orbsvcs/SSLIOP/SSLIOP_Transport.cpp @@ -203,14 +203,17 @@ TAO::SSLIOP::Transport::generate_request_header ( { this->set_bidir_context_info (opdetails); - // Set the flag to 0 - this->bidirectional_flag (0); + // Set the flag to 1 + this->bidirectional_flag (1); + + // At the moment we enable BiDIR giop we have to get a new + // request id to make sure that we follow the even/odd rule + // for request id's. We only need to do this when enabled + // it, after that the Transport Mux Strategy will make sure + // that the rule is followed + opdetails.request_id (this->tms ()->request_id ()); } - // Modify the request id if we have BiDirectional client/server - // setup - opdetails.modify_request_id (this->bidirectional_flag ()); - // We are going to pass on this request to the underlying messaging // layer. It should take care of this request return TAO_Transport::generate_request_header (opdetails, @@ -242,8 +245,8 @@ TAO::SSLIOP::Transport::tear_listen_point_list (TAO_InputCDR &cdr) return -1; // As we have received a bidirectional information, set the flag to - // 1 - this->bidirectional_flag (1); + // 0 + this->bidirectional_flag (0); return this->connection_handler_->process_listen_point_list (listen_list); } diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index 64406f8b0a0..78106b6b34e 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -9,6 +9,7 @@ #include "Protocols_Hooks.h" #include "ORB_Core.h" #include "Thread_Lane_Resources.h" +#include "Transport_Mux_Strategy.h" ACE_RCSID (tao, IIOP_Transport, @@ -22,21 +23,9 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler, , connection_handler_ (handler) , messaging_object_ (0) { -#if 0 - // First step in deprecating this. No one seems using it. - if (flag) - { - // Use the lite version of the protocol - ACE_NEW (this->messaging_object_, - TAO_GIOP_Message_Lite (orb_core)); - } - else -#endif /*if 0*/ - { - // Use the normal GIOP object - ACE_NEW (this->messaging_object_, - TAO_GIOP_Message_Base (orb_core)); - } + // Use the normal GIOP object + ACE_NEW (this->messaging_object_, + TAO_GIOP_Message_Base (orb_core)); } TAO_IIOP_Transport::~TAO_IIOP_Transport (void) @@ -223,13 +212,16 @@ TAO_IIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails, { this->set_bidir_context_info (opdetails); - // Set the flag to 0 (i.e., originating side) - this->bidirectional_flag (0); - } + // Set the flag to 1 (i.e., originating side) + this->bidirectional_flag (1); - // Modify the request id if we have BiDirectional client/server - // setup - opdetails.modify_request_id (this->bidirectional_flag ()); + // At the moment we enable BiDIR giop we have to get a new + // request id to make sure that we follow the even/odd rule + // for request id's. We only need to do this when enabled + // it, after that the Transport Mux Strategy will make sure + // that the rule is followed + opdetails.request_id (this->tms ()->request_id ()); + } return TAO_Transport::generate_request_header (opdetails, spec, @@ -259,8 +251,8 @@ TAO_IIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr) return -1; // As we have received a bidirectional information, set the flag to - // 1 (i.e., non-originating side) - this->bidirectional_flag (1); + // 0 (i.e., non-originating side) + this->bidirectional_flag (0); return this->connection_handler_->process_listen_point_list (listen_list); } diff --git a/TAO/tao/Strategies/SCIOP_Transport.cpp b/TAO/tao/Strategies/SCIOP_Transport.cpp index aa75017ed3b..c6f11765498 100644 --- a/TAO/tao/Strategies/SCIOP_Transport.cpp +++ b/TAO/tao/Strategies/SCIOP_Transport.cpp @@ -221,15 +221,17 @@ TAO_SCIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails, { this->set_bidir_context_info (opdetails); - // Set the flag to 0 (i.e., originating side) - this->bidirectional_flag (0); + // Set the flag to 1 (i.e., originating side) + this->bidirectional_flag (1); + + // At the moment we enable BiDIR giop we have to get a new + // request id to make sure that we follow the even/odd rule + // for request id's. We only need to do this when enabled + // it, after that the Transport Mux Strategy will make sure + // that the rule is followed + opdetails.request_id (this->tms ()->request_id ()); } - // Modify the request id if we have BiDirectional client/server - // setup - opdetails.modify_request_id (this->bidirectional_flag ()); - - return TAO_Transport::generate_request_header (opdetails, spec, msg); @@ -259,7 +261,7 @@ TAO_SCIOP_Transport::tear_listen_point_list (TAO_InputCDR &cdr) // As we have received a bidirectional information, set the flag to // 1 (i.e., non-originating side) - this->bidirectional_flag (1); + this->bidirectional_flag (0); return this->connection_handler_->process_listen_point_list (listen_list); } diff --git a/TAO/tao/operation_details.h b/TAO/tao/operation_details.h index c793cc47d9b..57cc5de3b9b 100644 --- a/TAO/tao/operation_details.h +++ b/TAO/tao/operation_details.h @@ -96,12 +96,9 @@ public: void reset_request_service_info (void); void reset_reply_service_info (void); - ///Cache the request id. + /// Cache the request id. void request_id (CORBA::ULong id); - /// Modify request id's for a BiDirectional setup - void modify_request_id (int originator); - /// Return the request ID associated with the operation CORBA::ULong request_id (void) const; diff --git a/TAO/tao/operation_details.i b/TAO/tao/operation_details.i index 7c75e72cf79..f1178f5bc87 100644 --- a/TAO/tao/operation_details.i +++ b/TAO/tao/operation_details.i @@ -106,20 +106,6 @@ TAO_Operation_Details::request_id (CORBA::ULong id) this->request_id_ = id; } -ACE_INLINE void -TAO_Operation_Details::modify_request_id (int originator) -{ - // originator == 1 --> originating side - // originator == 0 --> other side - // originator == -1 --> no bi-directional connection was negotiated - - // The originating side must have an even request ID, and the other - // side must have an odd request ID. Make sure that is the case. - if ((originator == 1 && ACE_ODD (this->request_id_)) - || (originator == 0 && ACE_EVEN (this->request_id_))) - ++(this->request_id_); -} - ACE_INLINE CORBA::ULong TAO_Operation_Details::request_id (void) const { -- cgit v1.2.1