diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-26 23:01:55 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-07-26 23:01:55 +0000 |
commit | b45e4f42aa0ba8228267f30d0744ff5d5407f3a5 (patch) | |
tree | fc323f8995af27241f1939051fefc15d27a8f7ab /TAO | |
parent | 362f57e6c7ce01454db15e896c702cf175b3d4e1 (diff) | |
download | ATCD-b45e4f42aa0ba8228267f30d0744ff5d5407f3a5.tar.gz |
ChangeLogTag:Mon Jul 26 17:11:16 1999 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog-99c | 14 | ||||
-rw-r--r-- | TAO/tao/GIOP.cpp | 13 | ||||
-rw-r--r-- | TAO/tao/GIOP.h | 4 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connect.cpp | 27 | ||||
-rw-r--r-- | TAO/tao/UIOP_Connect.cpp | 27 |
5 files changed, 65 insertions, 20 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c index 4ccb730d564..4f621412105 100644 --- a/TAO/ChangeLog-99c +++ b/TAO/ChangeLog-99c @@ -1,3 +1,15 @@ +Mon Jul 26 17:11:16 1999 Irfan Pyarali <irfan@cs.wustl.edu> + + * tao/IIOP_Connect.cpp (handle_input): + * tao/UIOP_Connect.cpp (handle_input): + + Take out all the information from the <message_state> and reset + it so that nested upcall on the same transport can be handled. + + * tao/GIOP.h (TAO_GIOP::process_server_message): Changed method + interface to take message_type and giop_version instead of + TAO_GIOP_Message_State. + Mon Jul 26 16:08:05 1999 Jeff Parsons <parsons@cs.wustl.edu> * TAO_IDL/ast/ast_module.cpp: @@ -29,7 +41,7 @@ Mon Jul 26 15:30:41 1999 Jeff Parsons <parsons@cs.wustl.edu> * skip.cpp: * ValueBase.i: * Typecode.i: - Minor mods to get rid of MSVC level 4 warnings, mostly casting + Minor mods to get rid of MSVC level 4 warnings, mostly casting return values from integer to CORBA::Boolean and the like * Typecode.h: diff --git a/TAO/tao/GIOP.cpp b/TAO/tao/GIOP.cpp index ae2c42602be..8d349cbae5f 100644 --- a/TAO/tao/GIOP.cpp +++ b/TAO/tao/GIOP.cpp @@ -879,7 +879,8 @@ int TAO_GIOP::process_server_message (TAO_Transport *transport, TAO_ORB_Core *orb_core, TAO_InputCDR &input, - const TAO_GIOP_Message_State &state) + CORBA::Octet message_type, + const TAO_GIOP_Version &giop_version) { char repbuf[ACE_CDR::DEFAULT_BUFSIZE]; #if defined(ACE_HAS_PURIFY) @@ -898,7 +899,7 @@ TAO_GIOP::process_server_message (TAO_Transport *transport, TAO_MINIMAL_TIMEPROBE (TAO_SERVER_CONNECTION_HANDLER_RECEIVE_REQUEST_END); - switch (state.message_type) + switch (message_type) { case TAO_GIOP::Request: // The following two routines will either raise an exception @@ -907,14 +908,14 @@ TAO_GIOP::process_server_message (TAO_Transport *transport, orb_core, input, output, - state.giop_version); + giop_version); case TAO_GIOP::LocateRequest: return TAO_GIOP::process_server_locate (transport, orb_core, input, output, - state.giop_version); + giop_version); case TAO_GIOP::MessageError: if (TAO_debug_level > 0) @@ -932,7 +933,7 @@ TAO_GIOP::process_server_message (TAO_Transport *transport, if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG, "TAO (%P|%t) Illegal message received by server\n")); - return TAO_GIOP::send_error (state.giop_version, transport); + return TAO_GIOP::send_error (giop_version, transport); } TAO_MINIMAL_TIMEPROBE (TAO_SERVER_CONNECTION_HANDLER_HANDLE_INPUT_END); @@ -985,7 +986,7 @@ TAO_GIOP::process_server_request (TAO_Transport *transport, // @@ This debugging output should *NOT* be used since the // object key string is not null terminated, nor can it - // be null terminated without copying. No copying should + // be null terminated without copying. No copying should // be done since performance is somewhat important here. // So, just remove the debugging output entirely. // diff --git a/TAO/tao/GIOP.h b/TAO/tao/GIOP.h index 1386791b8e7..c35d64ba215 100644 --- a/TAO/tao/GIOP.h +++ b/TAO/tao/GIOP.h @@ -479,10 +479,12 @@ public: TAO_GIOP_ServiceContextList& reply_ctx, CORBA::ULong& request_id, CORBA::ULong& reply_status); + static int process_server_message (TAO_Transport *transport, TAO_ORB_Core *orb_core, TAO_InputCDR &input, - const TAO_GIOP_Message_State& state); + CORBA::Octet message_type, + const TAO_GIOP_Version &giop_version); static int process_server_request (TAO_Transport *transport, TAO_ORB_Core* orb_core, diff --git a/TAO/tao/IIOP_Connect.cpp b/TAO/tao/IIOP_Connect.cpp index fa6615cbc5c..90410bf0249 100644 --- a/TAO/tao/IIOP_Connect.cpp +++ b/TAO/tao/IIOP_Connect.cpp @@ -236,15 +236,30 @@ TAO_IIOP_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); + + // 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_); + input_cdr, + message_type, + giop_version); if (result != -1) - { - this->transport_.message_state_.reset (); - result = 0; - } + result = 0; return result; } diff --git a/TAO/tao/UIOP_Connect.cpp b/TAO/tao/UIOP_Connect.cpp index dac245ffe98..f80672866ed 100644 --- a/TAO/tao/UIOP_Connect.cpp +++ b/TAO/tao/UIOP_Connect.cpp @@ -229,15 +229,30 @@ 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); + + // 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_); + input_cdr, + message_type, + giop_version); if (result != -1) - { - this->transport_.message_state_.reset (); - result = 0; - } + result = 0; return result; } |