From d11ff227b3310ad7e101fed015a5113c40236569 Mon Sep 17 00:00:00 2001 From: bala Date: Tue, 3 Jul 2001 21:32:50 +0000 Subject: ChangeLogTag:Tue Jul 3 16:29:06 2001 Balachandran Natarajan --- TAO/tao/Connection_Handler.h | 10 +++++++--- TAO/tao/IIOP_Connection_Handler.cpp | 10 +++++----- TAO/tao/Strategies/Makefile | 2 -- TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp | 14 ++++++++++++-- TAO/tao/Strategies/SHMIOP_Connection_Handler.h | 3 +++ TAO/tao/Strategies/SHMIOP_Transport.cpp | 2 +- TAO/tao/Strategies/UIOP_Connection_Handler.cpp | 16 +++++++++++----- TAO/tao/Strategies/UIOP_Connection_Handler.h | 3 +++ TAO/tao/Strategies/UIOP_Transport.cpp | 6 +++--- TAO/tao/Transport.cpp | 2 +- 10 files changed, 46 insertions(+), 22 deletions(-) diff --git a/TAO/tao/Connection_Handler.h b/TAO/tao/Connection_Handler.h index 6ca525bd1b0..b0ac01d0077 100644 --- a/TAO/tao/Connection_Handler.h +++ b/TAO/tao/Connection_Handler.h @@ -101,9 +101,13 @@ protected: /// Object. int svc_i (void); -#if !defined (TAO_CONNECTION_HANDLER_BUF_SIZE) -# define TAO_CONNECTION_HANDLER_BUF_SIZE 1024 -#endif /*TAO_CONNECTION_HANDLER_BUF_SIZE */ +#if !defined (TAO_CONNECTION_HANDLER_STACK_BUF_SIZE) +# define TAO_CONNECTION_HANDLER_STACK_BUF_SIZE 1024 +#endif /*TAO_CONNECTION_HANDLER_STACK_BUF_SIZE */ + +#if !defined (TAO_RESUMES_CONNECTION_HANDLER) +# define TAO_RESUMES_CONNECTION_HANDLER 1 +#endif /*TAO_RESUMES_CONNECTION_HANDLER*/ private: diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp index d36379a6e84..f897a5e0e11 100644 --- a/TAO/tao/IIOP_Connection_Handler.cpp +++ b/TAO/tao/IIOP_Connection_Handler.cpp @@ -247,16 +247,16 @@ TAO_IIOP_Connection_Handler::fetch_handle (void) int TAO_IIOP_Connection_Handler::resume_handler (void) { - return 1; + return TAO_RESUMES_CONNECTION_HANDLER; } int -TAO_IIOP_Connection_Handler::handle_output (ACE_HANDLE h) +TAO_IIOP_Connection_Handler::handle_output (ACE_HANDLE) { // Instantiate the resume handle here.. This will automatically // resume the handle once data is written.. TAO_Resume_Handle resume_handle (this->orb_core (), - h); + this->fetch_handle ()); return this->transport ()->handle_output (); } @@ -321,14 +321,14 @@ TAO_IIOP_Connection_Handler::process_listen_point_list ( int -TAO_IIOP_Connection_Handler::handle_input (ACE_HANDLE h) +TAO_IIOP_Connection_Handler::handle_input (ACE_HANDLE) { // Increase the reference count on the upcall that have passed us. this->pending_upcalls_++; TAO_Resume_Handle resume_handle (this->orb_core (), - h); + this->fetch_handle ()); int retval = this->transport ()->handle_input_i (resume_handle); diff --git a/TAO/tao/Strategies/Makefile b/TAO/tao/Strategies/Makefile index 717381335ad..5458f67df1b 100644 --- a/TAO/tao/Strategies/Makefile +++ b/TAO/tao/Strategies/Makefile @@ -38,8 +38,6 @@ CPP_SRCS += \ SHMIOP_Acceptor \ SHMIOP_Connection_Handler \ SHMIOP_Endpoint \ - GIOP_Message_NonReactive_Base \ - GIOP_Message_NonReactive_Handler \ TAO_Strategies_Internal \ uiop_endpoints \ advanced_resource \ diff --git a/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp b/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp index 6ab063aa2e8..5e0b8361a75 100644 --- a/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/SHMIOP_Connection_Handler.cpp @@ -218,9 +218,19 @@ TAO_SHMIOP_Connection_Handler::fetch_handle (void) return this->get_handle (); } +int +TAO_SHMIOP_Connection_Handler::resume_handler (void) +{ + return TAO_RESUMES_CONNECTION_HANDLER; +} + int TAO_SHMIOP_Connection_Handler::handle_output (ACE_HANDLE) { + // Instantiate the resume handle here.. This will automatically + // resume the handle once data is written.. + TAO_Resume_Handle resume_handle (this->orb_core (), + this->fetch_handle ()); return this->transport ()->handle_output (); } @@ -248,13 +258,13 @@ TAO_SHMIOP_Connection_Handler::add_transport_to_cache (void) int -TAO_SHMIOP_Connection_Handler::handle_input (ACE_HANDLE h) +TAO_SHMIOP_Connection_Handler::handle_input (ACE_HANDLE) { // Increase the reference count on the upcall that have passed us. this->pending_upcalls_++; TAO_Resume_Handle resume_handle (this->orb_core (), - h); + this->fetch_handle ()); int retval = this->transport ()->handle_input_i (resume_handle); diff --git a/TAO/tao/Strategies/SHMIOP_Connection_Handler.h b/TAO/tao/Strategies/SHMIOP_Connection_Handler.h index 59a0469cdbc..6cbf34e5457 100644 --- a/TAO/tao/Strategies/SHMIOP_Connection_Handler.h +++ b/TAO/tao/Strategies/SHMIOP_Connection_Handler.h @@ -90,6 +90,9 @@ public: /// Documented in ACE_Event_Handler virtual int handle_output (ACE_HANDLE); + /// Overload for resuming handlers.. + virtual int resume_handler (void); + /// Add ourselves to Cache. int add_transport_to_cache (void); diff --git a/TAO/tao/Strategies/SHMIOP_Transport.cpp b/TAO/tao/Strategies/SHMIOP_Transport.cpp index 8e3fd644f43..7072438a140 100644 --- a/TAO/tao/Strategies/SHMIOP_Transport.cpp +++ b/TAO/tao/Strategies/SHMIOP_Transport.cpp @@ -27,7 +27,7 @@ ACE_RCSID (Strategies, SHMIOP_Transport, "$Id$") TAO_SHMIOP_Transport::TAO_SHMIOP_Transport (TAO_SHMIOP_Connection_Handler *handler, TAO_ORB_Core *orb_core, - CORBA::Boolean flag) + CORBA::Boolean /*flag*/) : TAO_Transport (TAO_TAG_SHMEM_PROFILE, orb_core), connection_handler_ (handler), diff --git a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp index db70c0819ec..9e0e917070d 100644 --- a/TAO/tao/Strategies/UIOP_Connection_Handler.cpp +++ b/TAO/tao/Strategies/UIOP_Connection_Handler.cpp @@ -16,7 +16,7 @@ #include "tao/Base_Transport_Property.h" #include "tao/GIOP_Message_Lite.h" #include "tao/Transport_Cache_Manager.h" -#include "Resume_Handle.h" +#include "tao/Resume_Handle.h" #if !defined (__ACE_INLINE__) # include "UIOP_Connection_Handler.inl" @@ -202,6 +202,12 @@ TAO_UIOP_Connection_Handler::fetch_handle (void) return this->get_handle (); } +int +TAO_UIOP_Connection_Handler::resume_handler (void) +{ + return TAO_RESUMES_CONNECTION_HANDLER; +} + int TAO_UIOP_Connection_Handler::add_transport_to_cache (void) @@ -225,21 +231,21 @@ TAO_UIOP_Connection_Handler::add_transport_to_cache (void) int -TAO_UIOP_Connection_Handler::handle_input (ACE_HANDLE h) +TAO_UIOP_Connection_Handler::handle_input (ACE_HANDLE) { this->pending_upcalls_++; TAO_Resume_Handle resume_handle (this->orb_core (), - h); + this->fetch_handle ()); int retval = this->transport ()->handle_input_i (resume_handle); // The upcall is done. Bump down the reference count if (--this->pending_upcalls_ <= 0) - result = -1; + retval = -1; - return result; + return retval; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) diff --git a/TAO/tao/Strategies/UIOP_Connection_Handler.h b/TAO/tao/Strategies/UIOP_Connection_Handler.h index 7c0f46712e3..43f3a8ec981 100644 --- a/TAO/tao/Strategies/UIOP_Connection_Handler.h +++ b/TAO/tao/Strategies/UIOP_Connection_Handler.h @@ -106,6 +106,9 @@ public: /// Return the underlying handle virtual ACE_HANDLE fetch_handle (void); + /// Overload for resuming handlers.. + virtual int resume_handler (void); + /// Add ourselves to Cache. int add_transport_to_cache (void); diff --git a/TAO/tao/Strategies/UIOP_Transport.cpp b/TAO/tao/Strategies/UIOP_Transport.cpp index b209427e56e..825b20b8174 100644 --- a/TAO/tao/Strategies/UIOP_Transport.cpp +++ b/TAO/tao/Strategies/UIOP_Transport.cpp @@ -27,19 +27,19 @@ ACE_RCSID (Strategies, UIOP_Transport, "$Id$") TAO_UIOP_Transport::TAO_UIOP_Transport (TAO_UIOP_Connection_Handler *handler, TAO_ORB_Core *orb_core, - CORBA::Boolean flag) + CORBA::Boolean /*flag*/) : TAO_Transport (TAO_TAG_UIOP_PROFILE, orb_core) , connection_handler_ (handler) , messaging_object_ (0) { - if (flag) + /* if (flag) { // Use the lite version of the protocol ACE_NEW (this->messaging_object_, TAO_GIOP_Message_Lite (orb_core)); } - else + else*/ { // Use the normal GIOP object ACE_NEW (this->messaging_object_, diff --git a/TAO/tao/Transport.cpp b/TAO/tao/Transport.cpp index 24cf485c0bb..fe4ed69c630 100644 --- a/TAO/tao/Transport.cpp +++ b/TAO/tao/Transport.cpp @@ -803,7 +803,7 @@ TAO_Transport::handle_input_i (TAO_Resume_Handle &rh, // The buffer on the stack which will be used to hold the input // messages - char buf [TAO_CONNECTION_HANDLER_BUF_SIZE]; + char buf [TAO_CONNECTION_HANDLER_STACK_BUF_SIZE]; #if defined (ACE_HAS_PURIFY) (void) ACE_OS::memset (buf, -- cgit v1.2.1