summaryrefslogtreecommitdiff
path: root/TAO/tao/UIOP_Connect.cpp
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-02 23:54:47 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-02 23:54:47 +0000
commit97fe493a00e108dbd87e39e00ebb75a1bf1f2f73 (patch)
tree287840b004d5c55ffb8b5c3f9535f36a62ae356b /TAO/tao/UIOP_Connect.cpp
parentecbaa125ee2ce87fa61e224af8d6d9a9c9d65f48 (diff)
downloadATCD-97fe493a00e108dbd87e39e00ebb75a1bf1f2f73.tar.gz
ChangeLogTag:Wed Jun 2 18:53:15 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
Diffstat (limited to 'TAO/tao/UIOP_Connect.cpp')
-rw-r--r--TAO/tao/UIOP_Connect.cpp137
1 files changed, 63 insertions, 74 deletions
diff --git a/TAO/tao/UIOP_Connect.cpp b/TAO/tao/UIOP_Connect.cpp
index 6d3fe3f2e93..1663203a9df 100644
--- a/TAO/tao/UIOP_Connect.cpp
+++ b/TAO/tao/UIOP_Connect.cpp
@@ -30,13 +30,6 @@ TAO_UIOP_Handler_Base::TAO_UIOP_Handler_Base (ACE_Thread_Manager *t)
{
}
-int
-TAO_UIOP_Handler_Base::resume_handler (ACE_Reactor *)
-{
- errno = ENOTSUP;
- return -1;
-}
-
// ****************************************************************
// @@ For pluggable protocols, added a reference to
@@ -449,93 +442,89 @@ TAO_UIOP_Server_Connection_Handler::send_error (CORBA::ULong request_id,
{
// TAO_FUNCTION_PP_TIMEPROBE (TAO_SERVER_CONNECTION_HANDLER_SEND_RESPONSE_START);
- // The request_id is going to be not 0, if it was sucessfully read
- if (request_id != 0)
- {
- // Create a new output CDR stream
- TAO_OutputCDR output;
+ // Create a new output CDR stream
+ TAO_OutputCDR output;
- // Construct a REPLY header.
- TAO_GIOP::start_message (TAO_GIOP::Reply, output,
- this->orb_core_);
+ // Construct a REPLY header.
+ TAO_GIOP::start_message (TAO_GIOP::Reply, output,
+ this->orb_core_);
- // A new try/catch block, but if something goes wrong now we
- // have no hope, just abort.
- ACE_TRY_NEW_ENV
- {
- // create and write a dummy context
- TAO_GIOP_ServiceContextList resp_ctx;
- resp_ctx.length (0);
- output << resp_ctx;
+ // A new try/catch block, but if something goes wrong now we
+ // have no hope, just abort.
+ ACE_TRY_NEW_ENV
+ {
+ // create and write a dummy context
+ TAO_GIOP_ServiceContextList resp_ctx;
+ resp_ctx.length (0);
+ output << resp_ctx;
- // Write the request ID
- output.write_ulong (request_id);
+ // Write the request ID
+ output.write_ulong (request_id);
#if !defined (TAO_HAS_MINIMUM_CORBA)
- // @@ TODO This is the place to conditionally compile
- // forwarding. It certainly seems easy to strategize too,
- // just invoke an strategy to finish marshalling the
- // response.
+ // @@ TODO This is the place to conditionally compile
+ // forwarding. It certainly seems easy to strategize too,
+ // just invoke an strategy to finish marshalling the
+ // response.
- // Now we check for Forwarding ***************************
+ // Now we check for Forwarding ***************************
- // Try to narrow to ForwardRequest
- PortableServer::ForwardRequest_ptr forward_request_ptr =
- PortableServer::ForwardRequest::_narrow (x);
+ // Try to narrow to ForwardRequest
+ PortableServer::ForwardRequest_ptr forward_request_ptr =
+ PortableServer::ForwardRequest::_narrow (x);
- // If narrowing of exception succeeded
- if (forward_request_ptr != 0
- && !CORBA::is_nil (forward_request_ptr->forward_reference.in ()))
- {
- // write the reply_status
- output.write_ulong (TAO_GIOP_LOCATION_FORWARD);
+ // If narrowing of exception succeeded
+ if (forward_request_ptr != 0
+ && !CORBA::is_nil (forward_request_ptr->forward_reference.in ()))
+ {
+ // write the reply_status
+ output.write_ulong (TAO_GIOP_LOCATION_FORWARD);
- // write the object reference into the stream
- CORBA::Object_ptr object_ptr =
- forward_request_ptr->forward_reference.in();
+ // write the object reference into the stream
+ CORBA::Object_ptr object_ptr =
+ forward_request_ptr->forward_reference.in();
- output << object_ptr;
- }
- // end of the forwarding code ****************************
- else
+ output << object_ptr;
+ }
+ // end of the forwarding code ****************************
+ else
#endif /* TAO_HAS_MINIMUM_CORBA */
- {
- // Write the exception
- CORBA::TypeCode_ptr except_tc = x->_type ();
-
- CORBA::exception_type extype = CORBA::USER_EXCEPTION;
- if (CORBA::SystemException::_narrow (x) != 0)
- extype = CORBA::SYSTEM_EXCEPTION;
+ {
+ // Write the exception
+ CORBA::TypeCode_ptr except_tc = x->_type ();
- // write the reply_status
- output.write_ulong (TAO_GIOP::convert_CORBA_to_GIOP_exception (extype));
+ CORBA::exception_type extype = CORBA::USER_EXCEPTION;
+ if (CORBA::SystemException::_narrow (x) != 0)
+ extype = CORBA::SYSTEM_EXCEPTION;
- // write the actual exception
- output.encode (except_tc, x, 0, ACE_TRY_ENV);
- ACE_TRY_CHECK;
- }
- }
- ACE_CATCH (CORBA_Exception, ex)
- {
- // now we know, that while handling the error an other error
- // happened -> no hope, close connection.
+ // write the reply_status
+ output.write_ulong (TAO_GIOP::convert_CORBA_to_GIOP_exception (extype));
- // close the handle
- ACE_DEBUG ((LM_DEBUG,
- "(%P|%t) closing conn %d after fault %p\n",
- this->peer ().get_handle (),
- "TAO_UIOP_Server_Connection_Handler::send_error"));
- this->handle_close ();
- return;
+ // write the actual exception
+ output.encode (except_tc, x, 0, ACE_TRY_ENV);
+ ACE_TRY_CHECK;
}
- ACE_ENDTRY;
+ }
+ ACE_CATCH (CORBA_Exception, ex)
+ {
+ // now we know, that while handling the error an other error
+ // happened -> no hope, close connection.
- // hand it to the next lower layer
- TAO_GIOP::send_request (this->uiop_transport_, output, this->orb_core_);
+ // close the handle
+ ACE_DEBUG ((LM_DEBUG,
+ "(%P|%t) closing conn %d after fault %p\n",
+ this->peer ().get_handle (),
+ "TAO_UIOP_Server_Connection_Handler::send_error"));
+ this->handle_close ();
+ return;
}
+ ACE_ENDTRY;
+
+ // hand it to the next lower layer
+ TAO_GIOP::send_request (this->uiop_transport_, output, this->orb_core_);
}
int