diff options
author | bala <balanatarajan@users.noreply.github.com> | 2001-06-16 20:52:53 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2001-06-16 20:52:53 +0000 |
commit | bfa3bd6bf6e8db7f77fadaabe018012a0040ccbb (patch) | |
tree | 0f06955a85a1703d85a518275f84b9c4f33eb502 | |
parent | 28b00a03745934bd32610eb6a3826d182dd7d24d (diff) | |
download | ATCD-bfa3bd6bf6e8db7f77fadaabe018012a0040ccbb.tar.gz |
ChangeLogTag: Sat Jun 16 15:49:23 2001 Balachandran Natarajan <bala@cs.wustl.edu>
-rw-r--r-- | TAO/ChangeLogs/ChangeLog-02a | 17 | ||||
-rw-r--r-- | TAO/tao/Any.cpp | 6 | ||||
-rw-r--r-- | TAO/tao/Asynch_Reply_Dispatcher.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/CDR.cpp | 18 | ||||
-rw-r--r-- | TAO/tao/CDR.h | 39 | ||||
-rw-r--r-- | TAO/tao/CDR.i | 35 | ||||
-rw-r--r-- | TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Lite.cpp | 11 | ||||
-rw-r--r-- | TAO/tao/IIOP_Profile.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/Invocation.cpp | 109 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 78 | ||||
-rw-r--r-- | TAO/tao/Pluggable_Messaging_Utils.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/Synch_Reply_Dispatcher.cpp | 3 | ||||
-rw-r--r-- | TAO/tao/TAO_Server_Request.cpp | 2 |
14 files changed, 154 insertions, 186 deletions
diff --git a/TAO/ChangeLogs/ChangeLog-02a b/TAO/ChangeLogs/ChangeLog-02a index dad38ac5767..41695602f91 100644 --- a/TAO/ChangeLogs/ChangeLog-02a +++ b/TAO/ChangeLogs/ChangeLog-02a @@ -1,3 +1,20 @@ +Sat Jun 16 15:49:23 2001 Balachandran Natarajan <bala@cs.wustl.edu> + + * tao/Any.cpp: + * tao/Asynch_Reply_Dispatcher.cpp: + * tao/CDR.cpp: + * tao/CDR.h: + * tao/CDR.i: + * tao/GIOP_Message_Lite.cpp: + * tao/IIOP_Profile.cpp: + * tao/Invocation.cpp: + * tao/ORB.cpp: + * tao/Pluggable_Messaging_Utils.cpp: + * tao/Synch_Reply_Dispatcher.cpp: + * tao/TAO_Server_Request.cpp: + * tao/DynamicInterface/DII_Reply_Dispatcher.cpp: Integrated some + of the changes from the main trunk in this branch. + Wed Jun 13 17:55:24 2001 Balachandran Natarajan <bala@cs.wustl.edu> * tao/Incoming_Message_Queue.cpp: diff --git a/TAO/tao/Any.cpp b/TAO/tao/Any.cpp index 3b8dbdadf9f..4a5c307d38e 100644 --- a/TAO/tao/Any.cpp +++ b/TAO/tao/Any.cpp @@ -285,6 +285,8 @@ CORBA_Any::_tao_encode (TAO_OutputCDR &cdr, TAO_InputCDR in (this->cdr_, this->byte_order_, + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core); TAO_Marshal_Object::perform_append (this->type_.in (), &in, @@ -675,7 +677,7 @@ CORBA_Any::operator<<= (from_wstring ws) static CORBA::Long _oc_wstring [] = { TAO_ENCAP_BYTE_ORDER, // native endian + padding; "tricky" - ACE_static_cast (CORBA::Long, ws.bound_) + ACE_static_cast (CORBA::Long, ws.bound_) }; CORBA::TypeCode_ptr tc = 0; @@ -1599,6 +1601,8 @@ CORBA_Any::operator>>= (to_object obj) const // object), but the Any does not belong to any ORB. TAO_InputCDR stream (this->cdr_, this->byte_order_, + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, TAO_ORB_Core_instance ()); if (stream >> obj.ref_) diff --git a/TAO/tao/Asynch_Reply_Dispatcher.cpp b/TAO/tao/Asynch_Reply_Dispatcher.cpp index 1c9df1a2461..b4a20a82253 100644 --- a/TAO/tao/Asynch_Reply_Dispatcher.cpp +++ b/TAO/tao/Asynch_Reply_Dispatcher.cpp @@ -20,7 +20,10 @@ ACE_RCSID(tao, Asynch_Reply_Dispatcher, "$Id$") // Constructor. TAO_Asynch_Reply_Dispatcher_Base::TAO_Asynch_Reply_Dispatcher_Base (TAO_ORB_Core *orb_core) : reply_cdr_ (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE), + 0, TAO_ENCAP_BYTE_ORDER, + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core), transport_ (0) { diff --git a/TAO/tao/CDR.cpp b/TAO/tao/CDR.cpp index 890b563eb9d..07eb03a7cf2 100644 --- a/TAO/tao/CDR.cpp +++ b/TAO/tao/CDR.cpp @@ -78,6 +78,8 @@ TAO_OutputCDR::TAO_OutputCDR (size_t size, ACE_Allocator *data_block_allocator, ACE_Allocator* message_block_allocator, size_t memcpy_tradeoff, + ACE_CDR::Octet major_version, + ACE_CDR::Octet minor_version, ACE_Char_Codeset_Translator *char_translator, ACE_WChar_Codeset_Translator *wchar_translator) : ACE_OutputCDR (size, @@ -85,7 +87,9 @@ TAO_OutputCDR::TAO_OutputCDR (size_t size, buffer_allocator, data_block_allocator, message_block_allocator, - memcpy_tradeoff) + memcpy_tradeoff, + major_version, + minor_version) { ACE_FUNCTION_TIMEPROBE (TAO_OUTPUT_CDR_CTOR1_ENTER); this->char_translator_ = char_translator; @@ -99,6 +103,8 @@ TAO_OutputCDR::TAO_OutputCDR (char *data, ACE_Allocator *data_block_allocator, ACE_Allocator* message_block_allocator, size_t memcpy_tradeoff, + ACE_CDR::Octet major_version, + ACE_CDR::Octet minor_version, ACE_Char_Codeset_Translator *char_translator, ACE_WChar_Codeset_Translator *wchar_translator) : ACE_OutputCDR (data, @@ -107,7 +113,9 @@ TAO_OutputCDR::TAO_OutputCDR (char *data, buffer_allocator, data_block_allocator, message_block_allocator, - memcpy_tradeoff) + memcpy_tradeoff, + major_version, + minor_version) { ACE_FUNCTION_TIMEPROBE (TAO_OUTPUT_CDR_CTOR2_ENTER); this->char_translator_ = char_translator; @@ -117,11 +125,15 @@ TAO_OutputCDR::TAO_OutputCDR (char *data, TAO_OutputCDR::TAO_OutputCDR (ACE_Message_Block *data, int byte_order, size_t memcpy_tradeoff, + ACE_CDR::Octet major_version, + ACE_CDR::Octet minor_version, ACE_Char_Codeset_Translator *char_translator, ACE_WChar_Codeset_Translator *wchar_translator) : ACE_OutputCDR (data, byte_order, - memcpy_tradeoff) + memcpy_tradeoff, + major_version, + minor_version) { ACE_FUNCTION_TIMEPROBE (TAO_OUTPUT_CDR_CTOR3_ENTER); this->char_translator_ = char_translator; diff --git a/TAO/tao/CDR.h b/TAO/tao/CDR.h index 7e10ba3d262..4dd656b5674 100644 --- a/TAO/tao/CDR.h +++ b/TAO/tao/CDR.h @@ -89,6 +89,10 @@ public: ACE_Allocator* data_block_allocator = 0, ACE_Allocator* message_block_allocator = 0, size_t memcpy_tradeoff = 0, + ACE_CDR::Octet major_version = + TAO_DEF_GIOP_MAJOR, + ACE_CDR::Octet minor_version = + TAO_DEF_GIOP_MINOR, ACE_Char_Codeset_Translator *char_translator = 0, ACE_WChar_Codeset_Translator *wchar_translator = 0); @@ -101,6 +105,10 @@ public: ACE_Allocator* data_block_allocator = 0, ACE_Allocator* message_block_allocator = 0, size_t memcpy_tradeoff = 0, + ACE_CDR::Octet major_version = + TAO_DEF_GIOP_MAJOR, + ACE_CDR::Octet minor_version = + TAO_DEF_GIOP_MINOR, ACE_Char_Codeset_Translator *char_translator = 0, ACE_WChar_Codeset_Translator *wchar_translator = 0); @@ -109,6 +117,10 @@ public: TAO_OutputCDR (ACE_Message_Block *data, int byte_order = ACE_CDR_BYTE_ORDER, size_t memcpy_tradeoff = 0, + ACE_CDR::Octet major_version = + TAO_DEF_GIOP_MAJOR, + ACE_CDR::Octet minor_version = + TAO_DEF_GIOP_MINOR, ACE_Char_Codeset_Translator *char_translator = 0, ACE_WChar_Codeset_Translator *wchar_translator = 0); @@ -157,29 +169,51 @@ public: TAO_InputCDR (const char* buf, size_t bufsiz, int byte_order = ACE_CDR_BYTE_ORDER, + ACE_CDR::Octet major_version = + TAO_DEF_GIOP_MAJOR, + ACE_CDR::Octet minor_version = + TAO_DEF_GIOP_MINOR, TAO_ORB_Core* orb_core = 0); /// Create an empty input stream. The caller is responsible for /// putting the right data and providing the right alignment. TAO_InputCDR (size_t bufsiz, int byte_order = ACE_CDR_BYTE_ORDER, + ACE_CDR::Octet major_version = + TAO_DEF_GIOP_MAJOR, + ACE_CDR::Octet minor_version = + TAO_DEF_GIOP_MINOR, TAO_ORB_Core* orb_core = 0); /// Create an input stream from an ACE_Message_Block TAO_InputCDR (const ACE_Message_Block *data, int byte_order = ACE_CDR_BYTE_ORDER, + ACE_CDR::Octet major_version = + TAO_DEF_GIOP_MAJOR, + ACE_CDR::Octet minor_version = + TAO_DEF_GIOP_MINOR, TAO_ORB_Core* orb_core = 0); /// Create an input stream from an ACE_Data_Block TAO_InputCDR (ACE_Data_Block *data, + ACE_Message_Block::Message_Flags flag = 0, int byte_order = ACE_CDR_BYTE_ORDER, + ACE_CDR::Octet major_version = + TAO_DEF_GIOP_MAJOR, + ACE_CDR::Octet minor_version = + TAO_DEF_GIOP_MINOR, TAO_ORB_Core* orb_core = 0); /// Create an input stream from an ACE_Data_Block TAO_InputCDR (ACE_Data_Block *data, - size_t read_pointer_position, - size_t write_pointer_position, + ACE_Message_Block::Message_Flags flag = 0, + size_t read_pointer_position = 0, + size_t write_pointer_position = 0, int byte_order = ACE_CDR_BYTE_ORDER, + ACE_CDR::Octet major_version = + TAO_DEF_GIOP_MAJOR, + ACE_CDR::Octet minor_version = + TAO_DEF_GIOP_MINOR, TAO_ORB_Core* orb_core = 0); /** @@ -194,7 +228,6 @@ public: TAO_InputCDR (const TAO_InputCDR& rhs, size_t size, ACE_CDR::Long offset); - /** * This creates an encapsulated stream, the first byte must be (per * the spec) the byte order of the encapsulation. The default diff --git a/TAO/tao/CDR.i b/TAO/tao/CDR.i index 3c39bd41b13..5e405156437 100644 --- a/TAO/tao/CDR.i +++ b/TAO/tao/CDR.i @@ -10,10 +10,14 @@ ACE_INLINE TAO_InputCDR::TAO_InputCDR (const char *buf, size_t bufsiz, int byte_order, + ACE_CDR::Octet major_version, + ACE_CDR::Octet minor_version, TAO_ORB_Core* orb_core) : ACE_InputCDR (buf, bufsiz, - byte_order), + byte_order, + major_version, + minor_version), orb_core_ (orb_core) { this->init_translators (); @@ -22,9 +26,13 @@ TAO_InputCDR::TAO_InputCDR (const char *buf, ACE_INLINE TAO_InputCDR::TAO_InputCDR (size_t bufsiz, int byte_order, + ACE_CDR::Octet major_version, + ACE_CDR::Octet minor_version, TAO_ORB_Core* orb_core) : ACE_InputCDR (bufsiz, - byte_order), + byte_order, + major_version, + minor_version), orb_core_ (orb_core) { this->init_translators (); @@ -33,9 +41,13 @@ TAO_InputCDR::TAO_InputCDR (size_t bufsiz, ACE_INLINE TAO_InputCDR::TAO_InputCDR (const ACE_Message_Block *data, int byte_order, + ACE_CDR::Octet major_version, + ACE_CDR::Octet minor_version, TAO_ORB_Core* orb_core) : ACE_InputCDR (data, - byte_order), + byte_order, + major_version, + minor_version), orb_core_ (orb_core) { this->init_translators (); @@ -43,10 +55,16 @@ TAO_InputCDR::TAO_InputCDR (const ACE_Message_Block *data, ACE_INLINE TAO_InputCDR::TAO_InputCDR (ACE_Data_Block *data, + ACE_Message_Block::Message_Flags flag, int byte_order, + ACE_CDR::Octet major_version, + ACE_CDR::Octet minor_version, TAO_ORB_Core* orb_core) : ACE_InputCDR (data, - byte_order), + flag, + byte_order, + major_version, + minor_version), orb_core_ (orb_core) { this->init_translators (); @@ -55,14 +73,20 @@ TAO_InputCDR::TAO_InputCDR (ACE_Data_Block *data, ACE_INLINE TAO_InputCDR::TAO_InputCDR (ACE_Data_Block *data, + ACE_Message_Block::Message_Flags flag, size_t rd_pos, size_t wr_pos, int byte_order, + ACE_CDR::Octet major_version, + ACE_CDR::Octet minor_version, TAO_ORB_Core* orb_core) : ACE_InputCDR (data, + flag, rd_pos, wr_pos, - byte_order), + byte_order, + major_version, + minor_version), orb_core_ (orb_core) { this->init_translators (); @@ -275,4 +299,3 @@ operator>> (TAO_InputCDR &strm, CORBA::ParameterMode &_tao_enumval) return _tao_result; } - diff --git a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp index d2d42dcbb44..5471cd4d1f3 100644 --- a/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp +++ b/TAO/tao/DynamicInterface/DII_Reply_Dispatcher.cpp @@ -21,7 +21,10 @@ TAO_DII_Deferred_Reply_Dispatcher::TAO_DII_Deferred_Reply_Dispatcher ( TAO_ORB_Core *orb_core) : TAO_Asynch_Reply_Dispatcher_Base (orb_core), reply_cdr_ (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE), + 0, TAO_ENCAP_BYTE_ORDER, + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core), req_ (req) diff --git a/TAO/tao/GIOP_Message_Lite.cpp b/TAO/tao/GIOP_Message_Lite.cpp index 0db981b08f0..eff9e97cd7e 100644 --- a/TAO/tao/GIOP_Message_Lite.cpp +++ b/TAO/tao/GIOP_Message_Lite.cpp @@ -36,7 +36,10 @@ TAO_GIOP_Message_Lite::TAO_GIOP_Message_Lite (TAO_ORB_Core *orb_core, orb_core->resource_factory ()->output_cdr_msgblock_allocator () ), input_cdr_ (orb_core->create_input_cdr_data_block (input_cdr_size), + 0, TAO_ENCAP_BYTE_ORDER, + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core), current_offset_ (0) { @@ -53,6 +56,8 @@ TAO_GIOP_Message_Lite::TAO_GIOP_Message_Lite (TAO_ORB_Core *orb_core, this->cdr_dblock_alloc_, this->cdr_msgblock_alloc_, orb_core->orb_params ()->cdr_memcpy_tradeoff (), + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core->to_iso8859 (), orb_core->to_unicode ())); } @@ -442,7 +447,7 @@ TAO_GIOP_Message_Lite::process_request_message (TAO_Transport *transport, // Steal the input CDR from the message state. TAO_InputCDR input_cdr (ACE_InputCDR::Transfer_Contents (this->input_cdr_), - orb_core); + orb_core); // Send the message state for the service layer like FT to log the // messages @@ -599,7 +604,6 @@ TAO_GIOP_Message_Lite::process_request (TAO_Transport *transport, // Do this before the reply is sent. orb_core->adapter_registry ()->dispatch (request.object_key (), request, - 0, forward_to, ACE_TRY_ENV); ACE_TRY_CHECK; @@ -810,7 +814,6 @@ TAO_GIOP_Message_Lite::process_locate_request (TAO_Transport *transport, orb_core->adapter_registry ()->dispatch (server_request.object_key (), server_request, - 0, forward_to, ACE_TRY_ENV); ACE_TRY_CHECK; @@ -1258,6 +1261,8 @@ TAO_GIOP_Message_Lite::send_reply_exception ( orb_core->output_cdr_dblock_allocator (), orb_core->output_cdr_msgblock_allocator (), orb_core->orb_params ()->cdr_memcpy_tradeoff (), + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core->to_iso8859 (), orb_core->to_unicode ()); diff --git a/TAO/tao/IIOP_Profile.cpp b/TAO/tao/IIOP_Profile.cpp index ae7a2a55d0f..693c2451380 100644 --- a/TAO/tao/IIOP_Profile.cpp +++ b/TAO/tao/IIOP_Profile.cpp @@ -145,16 +145,11 @@ TAO_IIOP_Profile::decode (TAO_InputCDR& cdr) cdr.length (), encap_len)); -#if (TAO_HAS_RT_CORBA == 1) - // This protection is here not for correctness but for efficiency. - // Currently there are > 1 endpoint per profile only with RTCORBA. - - // Decode endpoints, if any. + // Decode any additional endpoints per profile. (At the present, + // only RTCORBA takes advantage of this feature.) if (this->decode_endpoints () == -1) return -1; -#endif /* TAO_HAS_RT_CORBA == 1 */ - if (cdr.good_bit ()) { // Invalidate the object_addr_ until first access. @@ -437,6 +432,8 @@ TAO_IIOP_Profile::encode (TAO_OutputCDR &stream) const this->orb_core ()->output_cdr_dblock_allocator (), this->orb_core ()->output_cdr_msgblock_allocator (), this->orb_core ()->orb_params ()->cdr_memcpy_tradeoff (), + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, this->orb_core ()->to_iso8859 (), this->orb_core ()->to_unicode ()); @@ -469,6 +466,8 @@ TAO_IIOP_Profile::create_tagged_profile (void) this->orb_core ()->output_cdr_dblock_allocator (), this->orb_core ()->output_cdr_msgblock_allocator (), this->orb_core ()->orb_params ()->cdr_memcpy_tradeoff (), + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, this->orb_core ()->to_iso8859 (), this->orb_core ()->to_unicode ()); diff --git a/TAO/tao/Invocation.cpp b/TAO/tao/Invocation.cpp index cdc62d61fe7..5f975f1e7b5 100644 --- a/TAO/tao/Invocation.cpp +++ b/TAO/tao/Invocation.cpp @@ -15,9 +15,7 @@ #include "Transport_Mux_Strategy.h" #include "Bind_Dispatcher_Guard.h" #include "Endpoint.h" -#include "RT_Policy_i.h" #include "Base_Transport_Property.h" -#include "Private_Transport_Descriptor.h" #include "Messaging_Policy_i.h" #include "GIOP_Utils.h" @@ -118,6 +116,8 @@ TAO_GIOP_Invocation::TAO_GIOP_Invocation (TAO_Stub *stub, orb_core->output_cdr_dblock_allocator (), orb_core->output_cdr_msgblock_allocator (), orb_core->orb_params ()->cdr_memcpy_tradeoff (), + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core->to_iso8859 (), orb_core->to_unicode ()), orb_core_ (orb_core), @@ -209,95 +209,6 @@ TAO_GIOP_Invocation::start (CORBA::Environment &ACE_TRY_ENV) ACE_TRY_ENV); ACE_CHECK; - // Loop until a connection is established or there aren't any more - // profiles to try. - // for (;;) - // { -// // Allow loaded services to select the profile. -// if (this->stub_->service_profile_selection ()) -// { -// this->profile_ = this->stub_->profile_in_use (); -// this->endpoint_ = this->profile_->endpoint (); -// } -// else -// { -// // If loaded services have nothing to say on -// // profile/endpoint selection, let the strategy do the work. -// this->endpoint_selector_->select_endpoint (this, -// ACE_TRY_ENV); -// ACE_CHECK; -// } - -// // Get the transport object. -// if (this->transport_ != 0) -// { -// this->transport_->make_idle (); -// } - -// // Create descriptor for the connection we need to find. -// TAO_Transport_Descriptor_Interface *desc; -// TAO_Base_Transport_Property default_desc (this->endpoint_); -// desc = &default_desc; - -// #if (TAO_HAS_RT_CORBA == 1) - -// // RTCORBA::PrivateConnectionPolicy processing. -// TAO_Private_Transport_Descriptor -// private_desc (this->endpoint_, -// ACE_reinterpret_cast (long, this->stub_)); -// if (this->endpoint_selection_state_.private_connection_) -// desc = &private_desc; - -// #endif /* TAO_HAS_RT_CORBA == 1 */ - -// // Release the transport prior to connecting. -// // In most cases the transport_ will already be zero. -// TAO_Transport::release (this->transport_); -// this->transport_ = 0; - -// // Obtain a connection. -// int result = this->conn_reg_->connect (desc, -// this->transport_, -// this->max_wait_time_, -// ACE_TRY_ENV); -// ACE_CHECK; - -// if (result == 0) -// { -// // Now that we have the client connection handler object we need to -// // set the right messaging protocol for in the client side transport. -// const TAO_GIOP_Message_Version& version = this->profile_->version (); -// result = this->transport_->messaging_init (version.major, -// version.minor); -// if (result == -1) -// { -// if (TAO_debug_level > 0) -// { -// ACE_DEBUG ((LM_DEBUG, -// ACE_TEXT ("(%N|%l|%p|%t) ") -// ACE_TEXT ("messaging_init() failed\n"))); -// } -// } -// else -// break; -// } - -// if (errno == ETIME) -// { -// ACE_THROW (CORBA::TIMEOUT ( -// CORBA_SystemException::_tao_minor_code ( -// TAO_TIMEOUT_CONNECT_MINOR_CODE, -// errno), -// CORBA::COMPLETED_NO)); -// } - -// // Try another profile/endpoint. -// this->endpoint_selector_->next (this, ACE_TRY_ENV); -// ACE_CHECK; - -// countdown.update (); -// } - // Set the unique request ID associated with this request. this->op_details_.request_id (this->transport_->tms ()->request_id ()); @@ -349,6 +260,10 @@ TAO_GIOP_Invocation::perform_call (TAO_Transport_Descriptor_Interface &desc, const TAO_GIOP_Message_Version& version = this->profile_->version (); result = this->transport_->messaging_init (version.major, version.minor); + + // Set the giop version of the out stream + this->out_stream_.set_version (version.major, version.minor); + if (result == -1) { if (TAO_debug_level > 0) @@ -625,12 +540,6 @@ TAO_GIOP_Invocation::location_forward_i (TAO_Stub *stubobj, this->restart_flag_ = 1; } - -#if (TAO_HAS_RT_CORBA == 1) -#include "tao/RT_Stub.h" -#endif /* TAO_HAS_RT_CORBA */ - - // **************************************************************** TAO_GIOP_Synch_Invocation::TAO_GIOP_Synch_Invocation (void) @@ -972,7 +881,7 @@ TAO_GIOP_Twoway_Invocation::invoke (TAO_Exception_Data *excepts, // If we couldn't find the right exception, report it as // CORBA::UNKNOWN. - ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_OMG_VMCID | 1, + ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), TAO_INVOKE_EXCEPTION); } @@ -1053,7 +962,7 @@ TAO_GIOP_Oneway_Invocation::invoke (CORBA::Environment &ACE_TRY_ENV) // This kind of exception shouldn't happen with oneways, // but if it does, we turn it into a CORBA::UNKNOWN exception. - ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_OMG_VMCID | 1, + ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), TAO_INVOKE_EXCEPTION); } @@ -1118,7 +1027,7 @@ TAO_GIOP_Locate_Request_Invocation::invoke (CORBA::Environment &ACE_TRY_ENV) // This kind of exception shouldn't happen with oneways, // but if it does, we turn it into a CORBA::UNKNOWN exception. - ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_OMG_VMCID | 1, + ACE_THROW_RETURN (CORBA::UNKNOWN (TAO_DEFAULT_MINOR_CODE, CORBA::COMPLETED_YES), TAO_INVOKE_EXCEPTION); } diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index fb0bde4a745..f54ba3a1d1f 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -19,10 +19,6 @@ #include "CDR.h" #include "MProfile.h" -#include "RT_ORB.h" -#include "Priority_Mapping_Manager.h" -#include "RT_Current.h" - #include "ORBInitInfo.h" #include "ORBInitializer_Registry.h" @@ -30,10 +26,6 @@ #include "TypeCodeFactory_Adapter.h" -#if TAO_HAS_RT_CORBA == 1 -# include "RT_ORBInitializer.h" /* @@ This should go away! */ -#endif /* TAO_HAS_RT_CORBA == 1 */ - #if TAO_HAS_CORBA_MESSAGING == 1 # include "Messaging_ORBInitializer.h" /* @@ This should go away! */ #endif /* TAO_HAS_CORBA_MESSAGING == 1 */ @@ -934,34 +926,6 @@ CORBA_ORB::resolve_policy_manager (CORBA::Environment &) } CORBA_Object_ptr -CORBA_ORB::resolve_rt_current (CORBA::Environment &/*ACE_TRY_ENV*/) -{ - -#if (TAO_HAS_RT_CORBA == 1) - - return this->orb_core_->rt_current (); - -#else - - return CORBA_Object::_nil (); - -#endif /* TAO_HAS_RT_CORBA == 1 */ - -} - -CORBA_Object_ptr -CORBA_ORB::resolve_rt_orb (CORBA::Environment &ACE_TRY_ENV) -{ -#if (TAO_HAS_RT_CORBA == 1) - return this->orb_core_->rt_orb (ACE_TRY_ENV); -#else - ACE_UNUSED_ARG (ACE_TRY_ENV); // FUZZ: ignore check_for_ace_check - return CORBA_Object::_nil (); -#endif /* TAO_HAS_RT_CORBA == 1 */ - -} - -CORBA_Object_ptr CORBA_ORB::resolve_policy_current (CORBA::Environment &) { @@ -1333,10 +1297,10 @@ CORBA_ORB::resolve_initial_references (const char *name, return this->orb_core ()->resolve_typecodefactory (ACE_TRY_ENV); else if (ACE_OS::strcmp (name, TAO_OBJID_RTORB) == 0) - return this->resolve_rt_orb (ACE_TRY_ENV); + return this->orb_core ()->resolve_rt_orb (ACE_TRY_ENV); else if (ACE_OS::strcmp (name, TAO_OBJID_RTCURRENT) == 0) - return this->resolve_rt_current (ACE_TRY_ENV); + return this->orb_core ()->resolve_rt_current (ACE_TRY_ENV); // ----------------------------------------------------------------- @@ -1509,30 +1473,11 @@ CORBA_ORB::init_orb_globals (CORBA::Environment &ACE_TRY_ENV) // should be registered via the service configurator, for // example. -#if TAO_HAS_RT_CORBA == 1 || TAO_HAS_CORBA_MESSAGING == 1 +#if TAO_HAS_CORBA_MESSAGING == 1 PortableInterceptor::ORBInitializer_ptr temp_orb_initializer = PortableInterceptor::ORBInitializer::_nil (); PortableInterceptor::ORBInitializer_var orb_initializer; -#endif /* TAO_HAS_RT_CORBA == 1 || TAO_HAS_CORBA_MESSAGING == 1 */ - -#if TAO_HAS_RT_CORBA == 1 - /// Register the RTCORBA ORBInitializer. - ACE_NEW_THROW_EX (temp_orb_initializer, - TAO_RT_ORBInitializer, - CORBA::NO_MEMORY ( - CORBA_SystemException::_tao_minor_code ( - TAO_DEFAULT_MINOR_CODE, - ENOMEM), - CORBA::COMPLETED_NO)); - ACE_CHECK; - orb_initializer = temp_orb_initializer; - PortableInterceptor::register_orb_initializer (orb_initializer.in (), - ACE_TRY_ENV); - ACE_CHECK; -#endif /* TAO_HAS_RT_CORBA == 1 */ - -#if TAO_HAS_CORBA_MESSAGING == 1 /// Register the Messaging ORBInitializer. ACE_NEW_THROW_EX (temp_orb_initializer, TAO_Messaging_ORBInitializer, @@ -1803,7 +1748,7 @@ CORBA_ORB::object_to_string (CORBA::Object_ptr obj, this->check_shutdown (ACE_TRY_ENV); ACE_CHECK_RETURN (0); - if (obj->_is_local ()) + if (!CORBA::is_nil (obj) && obj->_is_local ()) // @@ The CCM spec says one minor code, and the CORBA spec says // another. Which is the correct one? ACE_THROW_RETURN (CORBA::MARSHAL (TAO_OMG_VMCID | 4, @@ -1836,6 +1781,8 @@ CORBA_ORB::object_to_string (CORBA::Object_ptr obj, this->orb_core_->output_cdr_dblock_allocator (), this->orb_core_->output_cdr_msgblock_allocator (), this->orb_core_->orb_params ()->cdr_memcpy_tradeoff (), + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, this->orb_core_->to_iso8859 (), this->orb_core_->to_unicode ()); @@ -1884,12 +1831,16 @@ CORBA_ORB::object_to_string (CORBA::Object_ptr obj, } else { - if (obj->_stubobj () == 0) + // It is perfectly valid to marshal a nil object reference. + // However, it is not possible to convert a nil object reference + // to a URL IOR, so throw an exception. + if (CORBA::is_nil (obj) || obj->_stubobj () == 0) { if (TAO_debug_level > 0) ACE_ERROR ((LM_ERROR, - ACE_TEXT ("TAO_Stub pointer in CORBA::ORB::object_to_string() ") - ACE_TEXT ("is zero.\n"))); + ACE_TEXT ("Nil object reference or TAO_Stub ") + ACE_TEXT ("pointer is zero when converting\n") + ACE_TEXT ("object reference to URL IOR.\n"))); ACE_THROW_RETURN (CORBA::MARSHAL ( CORBA_SystemException::_tao_minor_code ( @@ -2030,7 +1981,8 @@ CORBA_ORB::ior_string_to_object (const char *str, int byte_order = *(mb.rd_ptr ()); mb.rd_ptr (1); mb.wr_ptr (len); - TAO_InputCDR stream (&mb, byte_order, this->orb_core_); + TAO_InputCDR stream (&mb, byte_order, TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, this->orb_core_); CORBA::Object_ptr objref = CORBA::Object::_nil (); stream >> objref; diff --git a/TAO/tao/Pluggable_Messaging_Utils.cpp b/TAO/tao/Pluggable_Messaging_Utils.cpp index d954c8299b3..8c6420c3694 100644 --- a/TAO/tao/Pluggable_Messaging_Utils.cpp +++ b/TAO/tao/Pluggable_Messaging_Utils.cpp @@ -14,7 +14,10 @@ TAO_Pluggable_Reply_Params::TAO_Pluggable_Reply_Params ( : input_cdr_ (orb_core->create_input_cdr_data_block ( ACE_CDR::DEFAULT_BUFSIZE ), + 0, TAO_ENCAP_BYTE_ORDER, + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core) { } diff --git a/TAO/tao/Synch_Reply_Dispatcher.cpp b/TAO/tao/Synch_Reply_Dispatcher.cpp index 3d623992f38..70c17a67629 100644 --- a/TAO/tao/Synch_Reply_Dispatcher.cpp +++ b/TAO/tao/Synch_Reply_Dispatcher.cpp @@ -18,7 +18,10 @@ TAO_Synch_Reply_Dispatcher::TAO_Synch_Reply_Dispatcher ( orb_core_ (orb_core), wait_strategy_ (0), reply_cdr_ (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE), + 0, TAO_ENCAP_BYTE_ORDER, + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, orb_core), leader_follower_condition_variable_ (0) { diff --git a/TAO/tao/TAO_Server_Request.cpp b/TAO/tao/TAO_Server_Request.cpp index 07a71c6c82b..c17d1f68ce1 100644 --- a/TAO/tao/TAO_Server_Request.cpp +++ b/TAO/tao/TAO_Server_Request.cpp @@ -287,6 +287,8 @@ TAO_ServerRequest::tao_send_reply_exception (CORBA::Exception &ex) this->orb_core_->output_cdr_dblock_allocator (), this->orb_core_->output_cdr_msgblock_allocator (), this->orb_core_->orb_params ()->cdr_memcpy_tradeoff (), + TAO_DEF_GIOP_MAJOR, + TAO_DEF_GIOP_MINOR, this->orb_core_->to_iso8859 (), this->orb_core_->to_unicode ()); |