From f39f0953e43bc1b5db694478f332bd5e4f6f8846 Mon Sep 17 00:00:00 2001 From: bala Date: Fri, 25 May 2001 16:21:04 +0000 Subject: *** empty log message *** --- TAO/tao/Connection_Handler.cpp | 11 +++++++---- TAO/tao/Connection_Handler.h | 3 --- TAO/tao/IIOP_Connection_Handler.cpp | 35 +++++++++++++++++++++++++++-------- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/TAO/tao/Connection_Handler.cpp b/TAO/tao/Connection_Handler.cpp index 985dbbf44c8..00338df34a7 100644 --- a/TAO/tao/Connection_Handler.cpp +++ b/TAO/tao/Connection_Handler.cpp @@ -17,7 +17,6 @@ TAO_Connection_Handler::TAO_Connection_Handler (TAO_ORB_Core *orb_core) :orb_core_ (orb_core), transport_ (0), tss_resources_ (orb_core->get_tss_resources ()) - //, is_registered_ (0) { } @@ -125,9 +124,13 @@ TAO_Connection_Handler::svc_i (void) void TAO_Connection_Handler::transport (TAO_Transport* transport) { - if (this->transport_ != 0) { - this->transport_->connection_handler_closing (); - } + // @@ Maybe this is not the place to increase reference counts. This + // method can be easily pass of as a set method. Need to look at a + // cleaner method of doing this - NB + if (this->transport_ != 0) + { + this->transport_->connection_handler_closing (); + } this->transport_ = TAO_Transport::_duplicate (transport); } diff --git a/TAO/tao/Connection_Handler.h b/TAO/tao/Connection_Handler.h index 5629f43aa74..4186b63e10c 100644 --- a/TAO/tao/Connection_Handler.h +++ b/TAO/tao/Connection_Handler.h @@ -119,9 +119,6 @@ private: /// Cached tss resources of the ORB that activated this object. TAO_ORB_Core_TSS_Resources *tss_resources_; - - /// Are we registered with the reactor? - // CORBA::Boolean is_registered_; }; #if defined (__ACE_INLINE__) diff --git a/TAO/tao/IIOP_Connection_Handler.cpp b/TAO/tao/IIOP_Connection_Handler.cpp index 0fdd2080ec9..44b3eca4655 100644 --- a/TAO/tao/IIOP_Connection_Handler.cpp +++ b/TAO/tao/IIOP_Connection_Handler.cpp @@ -313,11 +313,35 @@ int TAO_IIOP_Connection_Handler::handle_input (ACE_HANDLE h) { - // Increase the reference count on the upcall that have passed us. this->pending_upcalls_++; - return this->handle_input_i (h); + // The buffer on the stack which will be used to hold the input + // messages + char buf [TAO_CONNECTION_HANDLER_BUF_SIZE]; + +#if defined(ACE_HAS_PURIFY) + (void) ACE_OS::memset (buf, + '\0', + sizeof buf); +#endif /* ACE_HAS_PURIFY */ + + + // Create a message block + ACE_Message_Block message_block (buf, + sizeof (buf)); + + // Align the message block + ACE_CDR::mb_align (buf); + + // Read the message into the message block that we have created on + // the stack. + // @@ Start from here.. + this->transport ()->read_message + + // The upcall is done. Bump down the reference count + if (--this->pending_upcalls_ <= 0) + result = -1; } @@ -325,9 +349,6 @@ int TAO_IIOP_Connection_Handler::handle_input_i (ACE_HANDLE, ACE_Time_Value *max_wait_time) { - // The buffer on the stack which will be used to hold the input - // messages - char buf[TAO_CONNECTION_HANDLER_BUF_SIZE]; // Call the transport read the message @@ -342,9 +363,7 @@ TAO_IIOP_Connection_Handler::handle_input_i (ACE_HANDLE, } - // The upcall is done. Bump down the reference count - if (--this->pending_upcalls_ <= 0) - result = -1; + if (result == -1 || result == 1) -- cgit v1.2.1