diff options
Diffstat (limited to 'TAO/tao/UIOP_Connect.cpp')
-rw-r--r-- | TAO/tao/UIOP_Connect.cpp | 36 |
1 files changed, 31 insertions, 5 deletions
diff --git a/TAO/tao/UIOP_Connect.cpp b/TAO/tao/UIOP_Connect.cpp index f3de2b41e0c..1da2cb91ea8 100644 --- a/TAO/tao/UIOP_Connect.cpp +++ b/TAO/tao/UIOP_Connect.cpp @@ -70,7 +70,12 @@ TAO_UIOP_Server_Connection_Handler::TAO_UIOP_Server_Connection_Handler (ACE_Thre : TAO_UIOP_Handler_Base (t), transport_ (this, 0), orb_core_ (0), - tss_resources_ (0) + tss_resources_ (0), + // This will bomb if get called. But this constructor shouldnt be + // called anyway. + input_cdr_ (orb_core_->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE), + TAO_ENCAP_BYTE_ORDER, + orb_core_) { // This constructor should *never* get called, it is just here to // make the compiler happy: the default implementation of the @@ -84,7 +89,10 @@ TAO_UIOP_Server_Connection_Handler::TAO_UIOP_Server_Connection_Handler (TAO_ORB_ : TAO_UIOP_Handler_Base (orb_core), transport_ (this, orb_core), orb_core_ (orb_core), - tss_resources_ (orb_core->get_tss_resources ()) + tss_resources_ (orb_core->get_tss_resources ()), + input_cdr_ (orb_core->create_input_cdr_data_block (ACE_CDR::DEFAULT_BUFSIZE), + TAO_ENCAP_BYTE_ORDER, + orb_core) { } @@ -227,11 +235,29 @@ TAO_UIOP_Server_Connection_Handler::handle_input (ACE_HANDLE) if (result == 0 || result == -1) return result; - + + // = Take out all the information from the <message_state> and reset + // it so that nested upcall on the same Transport can be handled. + + // Copy message type. + CORBA::Octet message_type = this->transport_.message_state_.message_type; + + // Copy version. + TAO_GIOP_Version giop_version = this->transport_.message_state_.giop_version; + + // Steal the input CDR from the message state. + TAO_InputCDR input_cdr (this->transport_.message_state_.cdr, + this->transport_.message_state_.cdr.length ()); + + // Reset the message state. + this->transport_.message_state_.reset (); + result = TAO_GIOP::process_server_message (this->transport (), this->orb_core_, - this->transport_.message_state_.cdr, - this->transport_.message_state_); + this->input_cdr_, + message_type, + giop_version); + if (result != -1) { this->transport_.message_state_.reset (); |