diff options
author | bala <balanatarajan@users.noreply.github.com> | 2000-02-28 19:52:25 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2000-02-28 19:52:25 +0000 |
commit | ddf0e65e2453eafc7963b47ac607811a098957ea (patch) | |
tree | 7dd06cc1b0348bb4bebc01fbcef975cdd2935ea3 | |
parent | 8325fa94dbd3f8ed88d23f83f00b62a15289cc2c (diff) | |
download | ATCD-ddf0e65e2453eafc7963b47ac607811a098957ea.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/tao/GIOP_Message_Acceptors.cpp | 45 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Acceptors.h | 14 | ||||
-rw-r--r-- | TAO/tao/GIOP_Message_Acceptors.i | 18 | ||||
-rw-r--r-- | TAO/tao/IIOP_Connect.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/SHMIOP_Connect.cpp | 2 | ||||
-rw-r--r-- | TAO/tao/UIOP_Connect.cpp | 2 |
6 files changed, 41 insertions, 42 deletions
diff --git a/TAO/tao/GIOP_Message_Acceptors.cpp b/TAO/tao/GIOP_Message_Acceptors.cpp index 07c45f6b49c..0a1c42c3584 100644 --- a/TAO/tao/GIOP_Message_Acceptors.cpp +++ b/TAO/tao/GIOP_Message_Acceptors.cpp @@ -8,6 +8,7 @@ # include "tao/GIOP_Message_Acceptors.i" #endif /* __ACE_INLINE__ */ + int TAO_GIOP_Message_Acceptors:: process_connector_messages (TAO_Transport *transport, @@ -15,23 +16,7 @@ TAO_GIOP_Message_Acceptors:: TAO_InputCDR &input, CORBA::Octet message_type) { - char repbuf[ACE_CDR::DEFAULT_BUFSIZE]; - -#if defined(ACE_HAS_PURIFY) - (void) ACE_OS::memset (repbuf, - '\0', - sizeof repbuf); -#endif /* ACE_HAS_PURIFY */ - - TAO_OutputCDR output (repbuf, - sizeof repbuf, - TAO_ENCAP_BYTE_ORDER, - orb_core->output_cdr_buffer_allocator (), - orb_core->output_cdr_dblock_allocator (), - orb_core->orb_params ()->cdr_memcpy_tradeoff (), - orb_core->to_iso8859 (), - orb_core->to_unicode ()); - + this->output_.reset (); switch (message_type) { case TAO_GIOP_REQUEST: @@ -40,14 +25,12 @@ TAO_GIOP_Message_Acceptors:: // stream this->process_connector_request (transport, orb_core, - input, - output); + input); break; case TAO_GIOP_LOCATEREQUEST: this->process_connector_locate (transport, orb_core, - input, - output); + input); break; case TAO_GIOP_MESSAGERROR: case TAO_GIOP_REPLY: @@ -68,8 +51,7 @@ int TAO_GIOP_Message_Acceptors:: process_connector_request (TAO_Transport *transport, TAO_ORB_Core* orb_core, - TAO_InputCDR &input, - TAO_OutputCDR &output) + TAO_InputCDR &input) { // Get the revision info TAO_GIOP_Version version (this->major_version (), @@ -79,7 +61,7 @@ TAO_GIOP_Message_Acceptors:: // and <sync_with_server> as appropriate. TAO_GIOP_ServerRequest request (this, input, - output, + this->output_, orb_core, version); @@ -171,14 +153,14 @@ TAO_GIOP_Message_Acceptors:: { // Make the GIOP header and Reply header this->make_reply (request_id, - output); + this->output_); - output.write_ulong (TAO_GIOP_LOCATION_FORWARD); + this->output_.write_ulong (TAO_GIOP_LOCATION_FORWARD); CORBA::Object_ptr object_ptr = forward_request.forward_reference.in(); - output << object_ptr; + this->output_ << object_ptr; // Flag for code below catch blocks. location_forward = 1; @@ -279,8 +261,8 @@ TAO_GIOP_Message_Acceptors:: if ((response_required && !sync_with_server) || (sync_with_server && location_forward)) { - result = this->send_message (transport, - output); + result = this->send_message (transport, + this->output_); if (result == -1) { @@ -302,8 +284,7 @@ int TAO_GIOP_Message_Acceptors:: process_connector_locate (TAO_Transport *transport, TAO_ORB_Core* orb_core, - TAO_InputCDR &input, - TAO_OutputCDR &output) + TAO_InputCDR &input) { // Get the revision info TAO_GIOP_Version version (this->major_version (), @@ -478,7 +459,7 @@ TAO_GIOP_Message_Acceptors:: return this->make_locate_reply (transport, - output, + this->output_, locate_request, status_info); } diff --git a/TAO/tao/GIOP_Message_Acceptors.h b/TAO/tao/GIOP_Message_Acceptors.h index e635fdc3ada..ddb6e50c675 100644 --- a/TAO/tao/GIOP_Message_Acceptors.h +++ b/TAO/tao/GIOP_Message_Acceptors.h @@ -34,7 +34,8 @@ class TAO_Export TAO_GIOP_Message_Acceptors: public: - TAO_GIOP_Message_Acceptors (void); + TAO_GIOP_Message_Acceptors (TAO_ORB_Core *orb_core); + // Ctor int process_connector_messages (TAO_Transport *transport, TAO_ORB_Core *orb_core, @@ -50,8 +51,7 @@ private: int process_connector_request (TAO_Transport *transport, TAO_ORB_Core* orb_core, - TAO_InputCDR &input, - TAO_OutputCDR &output); + TAO_InputCDR &input); // A request was received on the server side. <transport> is the // source of the message (and thus where the replies should be // sent). <orb_core> is the ORB that received the message <input> @@ -62,8 +62,7 @@ private: int process_connector_locate (TAO_Transport *transport, TAO_ORB_Core* orb_core, - TAO_InputCDR &input, - TAO_OutputCDR &output); + TAO_InputCDR &input); // A LocateRequest was received on the server side. <transport> is // the source of the message (and thus where the replies should be // sent). <orb_core> is the ORB that received the message <input> @@ -105,6 +104,11 @@ private: TAO_GIOP_Message_Accept_Impl implementations_; + TAO_OutputCDR output_; + // The output CDR stream + + char repbuf_[ACE_CDR::DEFAULT_BUFSIZE]; + // A buffer that we will use to initialise the CDR stream //////////////////////////////////////////////////// // Inherited methods. Should not be here in the first place? diff --git a/TAO/tao/GIOP_Message_Acceptors.i b/TAO/tao/GIOP_Message_Acceptors.i index d35ea0ef75e..63a44f5b391 100644 --- a/TAO/tao/GIOP_Message_Acceptors.i +++ b/TAO/tao/GIOP_Message_Acceptors.i @@ -1,9 +1,23 @@ //$Id$ ACE_INLINE -TAO_GIOP_Message_Acceptors::TAO_GIOP_Message_Acceptors (void) +TAO_GIOP_Message_Acceptors:: + TAO_GIOP_Message_Acceptors (TAO_ORB_Core *orb_core) + : output_ (this->repbuf_, + sizeof this->repbuf_, + TAO_ENCAP_BYTE_ORDER, + orb_core->output_cdr_buffer_allocator (), + orb_core->output_cdr_dblock_allocator (), + orb_core->orb_params ()->cdr_memcpy_tradeoff (), + orb_core->to_iso8859 (), + orb_core->to_unicode ()) + { - //no-op +#if defined(ACE_HAS_PURIFY) + (void) ACE_OS::memset (this->repbuf_, + '\0', + sizeof this->repbuf_); +#endif /* ACE_HAS_PURIFY */ } ACE_INLINE CORBA::Octet diff --git a/TAO/tao/IIOP_Connect.cpp b/TAO/tao/IIOP_Connect.cpp index 4e851a1daaa..eb04d9a7fa6 100644 --- a/TAO/tao/IIOP_Connect.cpp +++ b/TAO/tao/IIOP_Connect.cpp @@ -104,7 +104,7 @@ TAO_IIOP_Server_Connection_Handler::TAO_IIOP_Server_Connection_Handler (TAO_ORB_ else { ACE_NEW (this->acceptor_factory_, - TAO_GIOP_Message_Acceptors); + TAO_GIOP_Message_Acceptors (orb_core)); } // OK, Here is a small twist. By now the all the objecs cached in diff --git a/TAO/tao/SHMIOP_Connect.cpp b/TAO/tao/SHMIOP_Connect.cpp index 7f5a7bd394c..05ea5472dd9 100644 --- a/TAO/tao/SHMIOP_Connect.cpp +++ b/TAO/tao/SHMIOP_Connect.cpp @@ -102,7 +102,7 @@ TAO_SHMIOP_Server_Connection_Handler::TAO_SHMIOP_Server_Connection_Handler (TAO_ else { ACE_NEW (this->acceptor_factory_, - TAO_GIOP_Message_Acceptors); + TAO_GIOP_Message_Acceptors (orb_core)); } // OK, Here is a small twist. By now the all the objecs cached in diff --git a/TAO/tao/UIOP_Connect.cpp b/TAO/tao/UIOP_Connect.cpp index e8b4362cea1..36735280a5e 100644 --- a/TAO/tao/UIOP_Connect.cpp +++ b/TAO/tao/UIOP_Connect.cpp @@ -109,7 +109,7 @@ TAO_UIOP_Server_Connection_Handler::TAO_UIOP_Server_Connection_Handler (TAO_ORB_ else { ACE_NEW (this->acceptor_factory_, - TAO_GIOP_Message_Acceptors); + TAO_GIOP_Message_Acceptors (orb_core)); } // OK, Here is a small twist. By now the all the objects cached in // this class would have been constructed. But we would like to make |