diff options
Diffstat (limited to 'TAO/tao/GIOP_Message_Generator_Parser_12.cpp')
-rw-r--r-- | TAO/tao/GIOP_Message_Generator_Parser_12.cpp | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp index ad83299eb75..a341edefd31 100644 --- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp +++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp @@ -38,60 +38,60 @@ TAO_GIOP_Message_Generator_Parser_12::write_request_header ( // First the request id msg << opdetails.request_id (); - const CORBA::Octet response_flags = opdetails.response_flags (); - - // Here are the Octet values for different policies - // '00000000' for SYNC_NONE - // '00000000' for SYNC_WITH_TRANSPORT - // '00000010' for SYNC_WITH_SERVER - // '00000011' for SYNC_WITH_TARGET - // '00000011' for regular two ways, but if they are invoked via a + const CORBA::Octet response_flags = opdetails.response_flags (); + + // Here are the Octet values for different policies + // '00000000' for SYNC_NONE + // '00000000' for SYNC_WITH_TRANSPORT + // '00000010' for SYNC_WITH_SERVER + // '00000011' for SYNC_WITH_TARGET + // '00000011' for regular two ways, but if they are invoked via a // DII with INV_NO_RESPONSE flag set then we need to send '00000001' // - // We have not implemented the policy INV_NO_RESPONSE for DII. - if (response_flags == TAO_TWOWAY_RESPONSE_FLAG) - msg << CORBA::Any::from_octet (3); - // Second the response flags - // Sync scope - ignored by server if request is not oneway. + // We have not implemented the policy INV_NO_RESPONSE for DII. + if (response_flags == TAO_TWOWAY_RESPONSE_FLAG) + msg << CORBA::Any::from_octet (3); + // Second the response flags + // Sync scope - ignored by server if request is not oneway. else if (response_flags == CORBA::Octet (TAO::SYNC_NONE) || - response_flags == CORBA::Octet (TAO::SYNC_WITH_TRANSPORT) || - response_flags == CORBA::Octet (TAO::SYNC_EAGER_BUFFERING) || - response_flags == CORBA::Octet (TAO::SYNC_DELAYED_BUFFERING)) + response_flags == CORBA::Octet (TAO::SYNC_WITH_TRANSPORT) || + response_flags == CORBA::Octet (TAO::SYNC_EAGER_BUFFERING) || + response_flags == CORBA::Octet (TAO::SYNC_DELAYED_BUFFERING)) // No response required. - msg << CORBA::Any::from_octet (0); + msg << CORBA::Any::from_octet (0); else if (response_flags == CORBA::Octet (TAO::SYNC_WITH_SERVER)) - // Return before dispatching to the servant - msg << CORBA::Any::from_octet (1); + // Return before dispatching to the servant + msg << CORBA::Any::from_octet (1); else if (response_flags == CORBA::Octet (TAO::SYNC_WITH_TARGET)) - // Return after dispatching servant. - msg << CORBA::Any::from_octet (3); + // Return after dispatching servant. + msg << CORBA::Any::from_octet (3); else - // Until more flags are defined by the OMG. + // Until more flags are defined by the OMG. return 0; // The reserved field CORBA::Octet reserved[3] = {0, 0, 0}; - msg.write_octet_array (reserved, 3); + msg.write_octet_array (reserved, 3); if (this->marshall_target_spec (spec, - msg) == 0) + msg) == 0) return 0; // Write the operation name msg.write_string (opdetails.opname_len (), - opdetails.opname ()); + opdetails.opname ()); // Write the service context list - msg << opdetails.service_info (); + msg << opdetails.service_info (); - // We align the pointer only if the operation has arguments. + // We align the pointer only if the operation has arguments. if (opdetails.argument_flag ()) { if (msg.align_write_ptr (TAO_GIOP_MESSAGE_ALIGN_PTR) == -1) - return 0; + return 0; } return 1; @@ -101,7 +101,7 @@ TAO_GIOP_Message_Generator_Parser_12::write_request_header ( int TAO_GIOP_Message_Generator_Parser_12::write_locate_request_header ( CORBA::ULong request_id, - TAO_Target_Specification &spec, + TAO_Target_Specification &spec, TAO_OutputCDR &msg ) { @@ -110,12 +110,12 @@ TAO_GIOP_Message_Generator_Parser_12::write_locate_request_header ( // Write the target address if (this->marshall_target_spec (spec, - msg) == 0) + msg) == 0) return 0; // I dont think we need to align the pointer to an 8 byte boundary // here. - // We need to align the pointer + // We need to align the pointer // if (msg.align_write_ptr (TAO_GIOP_MESSAGE_ALIGN_PTR) == -1) // return 0; @@ -349,6 +349,8 @@ TAO_GIOP_Message_Generator_Parser_12::parse_request_header ( input >> service_info; + // Check an process if BiDir contexts are available + this->check_bidirectional_context (request); if (input.length () > 0) { @@ -498,77 +500,77 @@ TAO_GIOP_Message_Generator_Parser_12::marshall_target_spec ( { case TAO_Target_Specification::Key_Addr: { - // As this is a union send in the discriminant first - msg << GIOP::KeyAddr; - - // Get the object key - const TAO_ObjectKey *key = spec.object_key (); - if (key) - { - // Marshall in the object key - msg << *key; - } - else - { - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); - return 0; - } - break; + // As this is a union send in the discriminant first + msg << GIOP::KeyAddr; + + // Get the object key + const TAO_ObjectKey *key = spec.object_key (); + if (key) + { + // Marshall in the object key + msg << *key; + } + else + { + if (TAO_debug_level) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); + return 0; + } + break; } case TAO_Target_Specification::Profile_Addr: { - // As this is a union send in the discriminant first - msg << GIOP::ProfileAddr; - - // Get the profile - const IOP::TaggedProfile *pfile = spec.profile (); - - if (pfile) - { - // Marshall in the object key - msg << *pfile; - } - else - { - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); - return 0; - } - break; + // As this is a union send in the discriminant first + msg << GIOP::ProfileAddr; + + // Get the profile + const IOP::TaggedProfile *pfile = spec.profile (); + + if (pfile) + { + // Marshall in the object key + msg << *pfile; + } + else + { + if (TAO_debug_level) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); + return 0; + } + break; } case TAO_Target_Specification::Reference_Addr: { - // As this is a union send in the discriminant first - msg << GIOP::ReferenceAddr; - - // Get the IOR - IOP::IOR *ior; - CORBA::ULong index = spec.iop_ior (ior); - - if (ior) - { - // This is a struct IORAddressingInfo. So, marshall each - // member of the struct one after another in the order - // defined. - msg << index; - msg << *ior; - } - else - { - if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); - return 0; - } - break; + // As this is a union send in the discriminant first + msg << GIOP::ReferenceAddr; + + // Get the IOR + IOP::IOR *ior; + CORBA::ULong index = spec.iop_ior (ior); + + if (ior) + { + // This is a struct IORAddressingInfo. So, marshall each + // member of the struct one after another in the order + // defined. + msg << index; + msg << *ior; + } + else + { + if (TAO_debug_level) + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); + return 0; + } + break; } default: if (TAO_debug_level) - ACE_DEBUG ((LM_DEBUG, - ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); + ACE_DEBUG ((LM_DEBUG, + ACE_TEXT ("(%N |%l) Unable to handle this request \n"))); return 0; } @@ -612,8 +614,6 @@ TAO_GIOP_Message_Generator_Parser_12::process_bidir_context ( context.context_data.get_buffer ()), context.context_data.length ()); - - return transport->tear_listen_point_list (cdr); } |