diff options
author | bala <balanatarajan@users.noreply.github.com> | 2002-11-23 15:53:49 +0000 |
---|---|---|
committer | bala <balanatarajan@users.noreply.github.com> | 2002-11-23 15:53:49 +0000 |
commit | a2940c98cf4ebb3b9a5dcc8c3e511a062b4e7cef (patch) | |
tree | 0e6900d7972f7d3ad6ac340c3b72368fdcfd158e /TAO/tao/IIOP_Transport.cpp | |
parent | 1f19b8819e8128b4f6806f53d3085cfd4d337dc9 (diff) | |
download | ATCD-a2940c98cf4ebb3b9a5dcc8c3e511a062b4e7cef.tar.gz |
ChangeLogTag: Sat Nov 23 10:52:28 2002 Balachandran Natarajan <bala@isis-server.isis.vanderbilt.edu>
Diffstat (limited to 'TAO/tao/IIOP_Transport.cpp')
-rw-r--r-- | TAO/tao/IIOP_Transport.cpp | 148 |
1 files changed, 74 insertions, 74 deletions
diff --git a/TAO/tao/IIOP_Transport.cpp b/TAO/tao/IIOP_Transport.cpp index 3b0e521da54..9249b2845f2 100644 --- a/TAO/tao/IIOP_Transport.cpp +++ b/TAO/tao/IIOP_Transport.cpp @@ -29,10 +29,10 @@ ACE_RCSID (tao, TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler, - TAO_ORB_Core *orb_core, - CORBA::Boolean flag) + TAO_ORB_Core *orb_core, + CORBA::Boolean flag) : TAO_Transport (IOP::TAG_INTERNET_IOP, - orb_core) + orb_core) , connection_handler_ (handler) , messaging_object_ (0) { @@ -47,13 +47,13 @@ TAO_IIOP_Transport::TAO_IIOP_Transport (TAO_IIOP_Connection_Handler *handler, { // Use the lite version of the protocol ACE_NEW (this->messaging_object_, - TAO_GIOP_Message_Lite (orb_core)); + TAO_GIOP_Message_Lite (orb_core)); } else { // Use the normal GIOP object ACE_NEW (this->messaging_object_, - TAO_GIOP_Message_Base (orb_core)); + TAO_GIOP_Message_Base (orb_core)); } } @@ -83,11 +83,11 @@ TAO_IIOP_Transport::messaging_object (void) ssize_t TAO_IIOP_Transport::send_i (iovec *iov, int iovcnt, - size_t &bytes_transferred, - const ACE_Time_Value *max_wait_time) + size_t &bytes_transferred, + const ACE_Time_Value *max_wait_time) { ssize_t retval = this->connection_handler_->peer ().sendv (iov, iovcnt, - max_wait_time); + max_wait_time); if (retval > 0) bytes_transferred = retval; @@ -96,12 +96,12 @@ TAO_IIOP_Transport::send_i (iovec *iov, int iovcnt, ssize_t TAO_IIOP_Transport::recv_i (char *buf, - size_t len, - const ACE_Time_Value *max_wait_time) + size_t len, + const ACE_Time_Value *max_wait_time) { ssize_t n = this->connection_handler_->peer ().recv (buf, - len, - max_wait_time); + len, + max_wait_time); // Do not print the error message if it is a timeout, which could // occur in thread-per-connection. @@ -110,16 +110,16 @@ TAO_IIOP_Transport::recv_i (char *buf, errno != ETIME) { ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO (%P|%t) - %p \n"), - ACE_TEXT ("TAO - read message failure ") - ACE_TEXT ("recv_i () \n"))); + ACE_TEXT ("TAO (%P|%t) - IIOP_Transport[%d]::recv_i, "), + ACE_TEXT ("read failure - %p"), + this->id ())); } // Error handling if (n == -1) { if (errno == EWOULDBLOCK) - return 0; + return 0; return -1; @@ -143,8 +143,8 @@ TAO_IIOP_Transport::register_handler_i (void) if (TAO_debug_level > 4) { ACE_DEBUG ((LM_DEBUG, - "TAO (%P|%t) - IIOP_Transport::register_handler %d\n", - this->id ())); + "TAO (%P|%t) - IIOP_Transport[%d]::register_handler\n", + this->id ())); } ACE_Reactor *r = this->orb_core_->reactor (); @@ -159,7 +159,7 @@ TAO_IIOP_Transport::register_handler_i (void) // Register the handler with the reactor return r->register_handler (this->connection_handler_, - ACE_Event_Handler::READ_MASK); + ACE_Event_Handler::READ_MASK); } @@ -202,7 +202,7 @@ TAO_IIOP_Transport::send_request (TAO_Stub *stub, { if (TAO_debug_level > 0) ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION, - "TAO_IIOP_Transport::send_request - " + "TAO (%P|%t) - TAO_IIOP_Transport::send_request - " "get_protocol_hooks"); return -1; @@ -243,11 +243,10 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream, if (n == -1) { if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("TAO: (%P|%t|%N|%l) closing transport %d after fault %p\n"), - this->id (), - ACE_TEXT ("send_message ()\n"))); - + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) - IIOP_Transport[%d]::send_message, ") + ACE_TEXT (" write failure - %p\n"), + this->id ())); return -1; } @@ -256,9 +255,9 @@ TAO_IIOP_Transport::send_message (TAO_OutputCDR &stream, int TAO_IIOP_Transport::send_message_shared (TAO_Stub *stub, - int message_semantics, - const ACE_Message_Block *message_block, - ACE_Time_Value *max_wait_time) + int message_semantics, + const ACE_Message_Block *message_block, + ACE_Time_Value *max_wait_time) { int r; { @@ -267,30 +266,31 @@ TAO_IIOP_Transport::send_message_shared (TAO_Stub *stub, if (this->check_event_handler_i ("Transport::send_message_shared") == -1) return -1; - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, - "TAO_IIOP_Transport::send_message\n enable_network_priority = %d\n", - this->connection_handler_->enable_network_priority ())); + if (TAO_debug_level > 6) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("TAO (%P|%t) - IIOP_Transport::send_message_shared, ") + ACE_TEXT ("enable_network_priority = %d\n"), + this->connection_handler_->enable_network_priority ())); - if (this->connection_handler_ != 0) - this->connection_handler_->set_dscp_codepoint (); + if (this->connection_handler_ != 0) + this->connection_handler_->set_dscp_codepoint (); r = this->send_message_shared_i (stub, message_semantics, message_block, max_wait_time); } if (r == -1) - { - this->close_connection (); - } + { + this->close_connection (); + } return r; } int TAO_IIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails, - TAO_Target_Specification &spec, - TAO_OutputCDR &msg) + TAO_Target_Specification &spec, + TAO_OutputCDR &msg) { // Check whether we have a Bi Dir IIOP policy set, whether the // messaging objects are ready to handle bidirectional connections @@ -312,16 +312,16 @@ TAO_IIOP_Transport::generate_request_header (TAO_Operation_Details &opdetails, return TAO_Transport::generate_request_header (opdetails, - spec, - msg); + spec, + msg); } int TAO_IIOP_Transport::messaging_init (CORBA::Octet major, - CORBA::Octet minor) + CORBA::Octet minor) { this->messaging_object_->init (major, - minor); + minor); return 1; } @@ -362,12 +362,12 @@ TAO_IIOP_Transport::set_bidir_context_info (TAO_Operation_Details &opdetails) { // Check whether it is a IIOP acceptor if ((*acceptor)->tag () == IOP::TAG_INTERNET_IOP) - { - // @@ Why isn't the return value checked! - // -Ossama - this->get_listen_point (listen_point_list, - *acceptor); - } + { + // @@ Why isn't the return value checked! + // -Ossama + this->get_listen_point (listen_point_list, + *acceptor); + } } // We have the ListenPointList at this point. Create a output CDR @@ -381,7 +381,7 @@ TAO_IIOP_Transport::set_bidir_context_info (TAO_Operation_Details &opdetails) // Add this info in to the svc_list opdetails.request_service_context ().set_context (IOP::BI_DIR_IIOP, - cdr); + cdr); return; } @@ -393,7 +393,7 @@ TAO_IIOP_Transport::get_listen_point ( { TAO_IIOP_Acceptor *iiop_acceptor = ACE_dynamic_cast (TAO_IIOP_Acceptor *, - acceptor ); + acceptor ); // Get the array of endpoints serviced by TAO_IIOP_Acceptor const ACE_INET_Addr *endpoint_addr = @@ -410,10 +410,10 @@ TAO_IIOP_Transport::get_listen_point ( == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) Could not resolve local ") - ACE_TEXT ("host address in ") - ACE_TEXT ("get_listen_point()\n")), - -1); + ACE_TEXT ("(%P|%t) Could not resolve local ") + ACE_TEXT ("host address in ") + ACE_TEXT ("get_listen_point()\n")), + -1); } // Note: Looks like there is no point in sending the list of @@ -423,13 +423,13 @@ TAO_IIOP_Transport::get_listen_point ( // Get the hostname for the local address if (iiop_acceptor->hostname (this->orb_core_, - local_addr, - local_interface.out ()) == -1) + local_addr, + local_interface.out ()) == -1) { ACE_ERROR_RETURN ((LM_ERROR, - ACE_TEXT ("(%P|%t) Could not resolve local host") - ACE_TEXT (" name \n")), - -1); + ACE_TEXT ("(%P|%t) Could not resolve local host") + ACE_TEXT (" name \n")), + -1); } for (size_t index = 0; @@ -437,20 +437,20 @@ TAO_IIOP_Transport::get_listen_point ( index++) { if (local_addr.get_ip_address() - == endpoint_addr[index].get_ip_address()) - { - // Get the count of the number of elements - CORBA::ULong len = listen_point_list.length (); - - // Increase the length by 1 - listen_point_list.length (len + 1); - - // We have the connection and the acceptor endpoint on the - // same interface - IIOP::ListenPoint &point = listen_point_list[len]; - point.host = CORBA::string_dup (local_interface.in ()); - point.port = endpoint_addr[index].get_port_number (); - } + == endpoint_addr[index].get_ip_address()) + { + // Get the count of the number of elements + CORBA::ULong len = listen_point_list.length (); + + // Increase the length by 1 + listen_point_list.length (len + 1); + + // We have the connection and the acceptor endpoint on the + // same interface + IIOP::ListenPoint &point = listen_point_list[len]; + point.host = CORBA::string_dup (local_interface.in ()); + point.port = endpoint_addr[index].get_port_number (); + } } return 1; |