summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp62
-rw-r--r--TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp5
-rw-r--r--TAO/tao/CSD_Framework/CSD_Framework.pidl12
-rw-r--r--TAO/tao/CodecFactory/IOP_Codec.pidl2
-rw-r--r--TAO/tao/Connector_Registry.cpp6
-rw-r--r--TAO/tao/GIOP_Message_Generator_Parser_12.cpp3
-rw-r--r--TAO/tao/Invocation_Adapter.cpp1
-rw-r--r--TAO/tao/LocateRequest_Invocation_Adapter.cpp3
-rw-r--r--TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp25
-rw-r--r--TAO/tao/Messaging/Asynch_Invocation_Adapter.h7
-rw-r--r--TAO/tao/PortableServer/Root_POA.cpp4
-rw-r--r--TAO/tao/PortableServer/get_arg.h8
-rw-r--r--TAO/tao/Service_Context.h6
-rw-r--r--TAO/tao/Service_Context.inl6
-rw-r--r--TAO/tao/extra_core.mpb1
-rw-r--r--TAO/tao/operation_details.h17
-rw-r--r--TAO/tao/operation_details.inl17
17 files changed, 118 insertions, 67 deletions
diff --git a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
index 9601c14d2ca..da928d5b802 100644
--- a/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
+++ b/TAO/TAO_IDL/be/be_visitor_operation/ami_cs.cpp
@@ -172,40 +172,52 @@ be_visitor_operation_ami_cs::visit_operation (be_operation *node)
<< "}" << be_uidt;
}
- *os << be_nl<< be_nl
- << "TAO::Arg_Traits<void>::ret_val _tao_retval;";
+ // Includes the reply handler, but we have to add 1 for the retval anyway.
+ int nargs = ami_op->argument_count ();
- // Declare the argument helper classes.
- this->gen_stub_body_arglist (ami_op, os, true);
+ if (nargs == 1)
+ {
+ // No arguments other than the reply handler, and the return
+ // type is void. No need to generate argument list.
- // Assemble the arg helper class pointer array.
- *os << be_nl << be_nl
- << "TAO::Argument *_the_tao_operation_signature [] =" << be_idt_nl
- << "{" << be_idt_nl
- << "&_tao_retval";
+ *os << be_nl << be_nl
+ << "TAO::Argument ** _the_tao_operation_signature = 0;";
+ nargs = 0; // Don't count the reply handler.
+ }
+ else
+ {
+ *os << be_nl<< be_nl
+ << "TAO::Arg_Traits<void>::ret_val _tao_retval;";
- AST_Argument *arg = 0;
- UTL_ScopeActiveIterator arg_list_iter (ami_op,
- UTL_Scope::IK_decls);
+ // Declare the argument helper classes.
+ this->gen_stub_body_arglist (ami_op, os, true);
- // For a sendc_* operation, skip the reply handler (first argument).
- arg_list_iter.next ();
+ // Assemble the arg helper class pointer array.
+ *os << be_nl << be_nl
+ << "TAO::Argument *_the_tao_operation_signature[] =" << be_idt_nl
+ << "{" << be_idt_nl
+ << "&_tao_retval";
- for (; ! arg_list_iter.is_done (); arg_list_iter.next ())
- {
- arg = AST_Argument::narrow_from_decl (arg_list_iter.item ());
+ AST_Argument *arg = 0;
+ UTL_ScopeActiveIterator arg_list_iter (ami_op,
+ UTL_Scope::IK_decls);
- *os << "," << be_nl
- << "&_tao_" << arg->local_name ();
- }
+ // For a sendc_* operation, skip the reply handler (first argument).
+ arg_list_iter.next ();
- *os << be_uidt_nl
- << "};" << be_uidt;
+ for (; ! arg_list_iter.is_done (); arg_list_iter.next ())
+ {
+ arg = AST_Argument::narrow_from_decl (arg_list_iter.item ());
- be_interface *intf = be_interface::narrow_from_decl (parent);
+ *os << "," << be_nl
+ << "&_tao_" << arg->local_name ();
+ }
- // Includes the reply handler, but we have to add 1 for the retval anyway.
- int nargs = ami_op->argument_count ();
+ *os << be_uidt_nl
+ << "};" << be_uidt;
+ }
+
+ be_interface *intf = be_interface::narrow_from_decl (parent);
const char *lname = node->local_name ()->get_string ();
size_t opname_len = ACE_OS::strlen (lname);
diff --git a/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp b/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp
index 24684bf7866..48c969ae81a 100644
--- a/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp
+++ b/TAO/tao/CSD_Framework/CSD_FW_Server_Request_Wrapper.cpp
@@ -311,7 +311,7 @@ TAO::CSD::FW_Server_Request_Wrapper::clone (TAO_Operation_Details const *& from,
TAO_Operation_Details *& from_non_const
= const_cast <TAO_Operation_Details *&>(from);
- char* cloned_op_name;
+ char* cloned_op_name = 0;
ACE_NEW_RETURN (cloned_op_name,
char[from_non_const->opname_len_ + 1],
false);
@@ -360,11 +360,10 @@ TAO::CSD::FW_Server_Request_Wrapper::clone (TAO_Operation_Details const *& from,
// CSD-TBD: Eventually need to use allocators.
// CSD-TBD: Assert that this->ex_data_ and this->ex_count_ are both == 0
- TAO_Operation_Details* to_non_const;
+ TAO_Operation_Details* to_non_const = 0;
ACE_NEW_RETURN (to_non_const,
TAO_Operation_Details(cloned_op_name,
from_non_const->opname_len_,
- from_non_const->argument_flag_,
0,
0,
0,
diff --git a/TAO/tao/CSD_Framework/CSD_Framework.pidl b/TAO/tao/CSD_Framework/CSD_Framework.pidl
index f0ab5b1a1fe..ef542697765 100644
--- a/TAO/tao/CSD_Framework/CSD_Framework.pidl
+++ b/TAO/tao/CSD_Framework/CSD_Framework.pidl
@@ -29,19 +29,19 @@ module CSD_Framework {
# pragma version CSD_Framework 2.3
- // This is a common base interface for all CSD strategy
- // implementations
+ /// This is a common base interface for all CSD strategy
+ /// implementations
local interface Strategy {
# pragma version Strategy 2.3
- // This is support for a legacy method of supplying a strategy to a
- // POA.
+ /// This is support for a legacy method of supplying a strategy to a
+ /// POA.
boolean apply_to(in PortableServer::POA p);
};
- // Specialized POA providing a method to supply a strategy object to
- // the POA.
+ /// Specialized POA providing a method to supply a strategy object to
+ /// the POA.
local interface POA : PortableServer::POA {
# pragma version POA 2.3
diff --git a/TAO/tao/CodecFactory/IOP_Codec.pidl b/TAO/tao/CodecFactory/IOP_Codec.pidl
index ef3dd5a8dac..3157ae946ea 100644
--- a/TAO/tao/CodecFactory/IOP_Codec.pidl
+++ b/TAO/tao/CodecFactory/IOP_Codec.pidl
@@ -7,7 +7,7 @@
*
* @brief Pre-compiled IDL source for the IOP module.
*
- * This file is used to generate IOPC.{h,cpp}, using the following
+ * This file is used to generate IOP_CodecC.{h,cpp}, using the following
* command:
*
* tao_idl.exe
diff --git a/TAO/tao/Connector_Registry.cpp b/TAO/tao/Connector_Registry.cpp
index 43321c26f5d..1de294f0b1f 100644
--- a/TAO/tao/Connector_Registry.cpp
+++ b/TAO/tao/Connector_Registry.cpp
@@ -79,7 +79,8 @@ TAO_Connector_Registry::open (TAO_ORB_Core *orb_core)
if (connector->open (orb_core) != 0)
{
ACE_ERROR_RETURN ((LM_ERROR,
- ACE_TEXT ("TAO (%P|%t) unable to open connector for ")
+ ACE_TEXT ("TAO (%P|%t) - TAO_Connector_Registry")
+ ACE_TEXT ("::open: unable to open connector for ")
ACE_TEXT ("<%s>.\n"),
ACE_TEXT_CHAR_TO_TCHAR((*factory)->protocol_name ().c_str ())),
-1);
@@ -186,7 +187,8 @@ TAO_Connector_Registry::create_profile (TAO_InputCDR &cdr)
if (TAO_debug_level > 0)
{
ACE_DEBUG ((LM_DEBUG,
- ACE_TEXT ("TAO (%P|%t) Unknown profile tag 0x%x\n"),
+ ACE_TEXT ("TAO (%P|%t) - TAO_Connector_Registry::")
+ ACE_TEXT ("create_profile: Unknown profile tag 0x%x\n"),
tag));
}
diff --git a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
index 086081e78d6..45d99c67a36 100644
--- a/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
+++ b/TAO/tao/GIOP_Message_Generator_Parser_12.cpp
@@ -543,8 +543,7 @@ TAO_GIOP_Message_Generator_Parser_12::check_bidirectional_context (
// Check whether we have the BiDir service context info available in
// the ServiceContextList
- if (service_context.is_service_id (IOP::BI_DIR_IIOP)
- == 1)
+ if (service_context.is_service_id (IOP::BI_DIR_IIOP))
{
return this->process_bidir_context (service_context,
request.transport ());
diff --git a/TAO/tao/Invocation_Adapter.cpp b/TAO/tao/Invocation_Adapter.cpp
index 39ac727b340..b26bad9f3f1 100644
--- a/TAO/tao/Invocation_Adapter.cpp
+++ b/TAO/tao/Invocation_Adapter.cpp
@@ -41,7 +41,6 @@ namespace TAO
TAO_Operation_Details op_details (this->operation_,
this->op_len_,
- this->number_args_ > 1,
this->args_,
this->number_args_,
ex_data,
diff --git a/TAO/tao/LocateRequest_Invocation_Adapter.cpp b/TAO/tao/LocateRequest_Invocation_Adapter.cpp
index c51b4e483f0..98e31a4cd23 100644
--- a/TAO/tao/LocateRequest_Invocation_Adapter.cpp
+++ b/TAO/tao/LocateRequest_Invocation_Adapter.cpp
@@ -67,8 +67,7 @@ namespace TAO
// Dummy operation details that is used to instantiate the
// LocateRequest class.
TAO_Operation_Details op (0,
- 0,
- false);
+ 0);
op.request_id (resolver.transport ()->tms ()->request_id ());
TAO::LocateRequest_Invocation synch (this->target_,
diff --git a/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp b/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
index b88ff2855ae..f0ef8094e34 100644
--- a/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
+++ b/TAO/tao/Messaging/Asynch_Invocation_Adapter.cpp
@@ -120,6 +120,25 @@ namespace TAO
}
Invocation_Status
+ Asynch_Invocation_Adapter::invoke_collocated_i (
+ TAO_Stub *stub,
+ TAO_Operation_Details &details,
+ CORBA::Object_var &effective_target,
+ Collocation_Strategy strat
+ ACE_ENV_ARG_DECL)
+ {
+ // When doing a collocation asynch invocation we shouldn't use the
+ // stub args but use the skel args
+ details.use_stub_args (false);
+
+ return Invocation_Adapter::invoke_collocated_i (stub,
+ details,
+ effective_target,
+ strat
+ ACE_ENV_ARG_PARAMETER);
+ }
+
+ Invocation_Status
Asynch_Invocation_Adapter::invoke_twoway (
TAO_Operation_Details &op,
CORBA::Object_var &effective_target,
@@ -165,7 +184,7 @@ namespace TAO
op,
this->safe_rd_.release ());
- Invocation_Status s =
+ Invocation_Status const s =
asynch.remote_invocation (max_wait_time
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (TAO_INVOKE_FAILURE);
@@ -176,10 +195,10 @@ namespace TAO
effective_target = asynch.steal_forwarded_reference ();
#if TAO_HAS_INTERCEPTORS == 1
- const CORBA::Boolean permanent_forward =
+ CORBA::Boolean const permanent_forward =
(asynch.reply_status() == TAO_GIOP_LOCATION_FORWARD_PERM);
#else
- const CORBA::Boolean permanent_forward = false;
+ CORBA::Boolean const permanent_forward = false;
#endif
this->object_forwarded (effective_target,
diff --git a/TAO/tao/Messaging/Asynch_Invocation_Adapter.h b/TAO/tao/Messaging/Asynch_Invocation_Adapter.h
index 97cc214a71d..0a36175d751 100644
--- a/TAO/tao/Messaging/Asynch_Invocation_Adapter.h
+++ b/TAO/tao/Messaging/Asynch_Invocation_Adapter.h
@@ -89,6 +89,13 @@ namespace TAO
ACE_Time_Value *&max_wait_time
ACE_ENV_ARG_DECL);
+ virtual Invocation_Status invoke_collocated_i (
+ TAO_Stub *stub,
+ TAO_Operation_Details &details,
+ CORBA::Object_var &effective_target,
+ Collocation_Strategy strat
+ ACE_ENV_ARG_DECL);
+
private:
/// Autofunctor to manage the reply dispatcher
ACE_Utils::Auto_Functor<TAO_Asynch_Reply_Dispatcher_Base,
diff --git a/TAO/tao/PortableServer/Root_POA.cpp b/TAO/tao/PortableServer/Root_POA.cpp
index a1fa33136ac..5e7121a0806 100644
--- a/TAO/tao/PortableServer/Root_POA.cpp
+++ b/TAO/tao/PortableServer/Root_POA.cpp
@@ -417,6 +417,7 @@ TAO_Root_POA::create_POA_i (const char *adapter_name,
if (CORBA::is_nil (poa_manager))
{
+#if !defined (CORBA_E_COMPACT)
PortableServer::POA_var poa = PortableServer::POA::_duplicate (this);
PortableServer::POA_var root_poa;
@@ -442,6 +443,7 @@ TAO_Root_POA::create_POA_i (const char *adapter_name,
empty_policies
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (PortableServer::POA::_nil ());
+#endif /* !CORBA_E_COMPACT */
}
else
{
@@ -456,7 +458,7 @@ TAO_Root_POA::create_POA_i (const char *adapter_name,
return poa._retn ();
}
-#endif
+#endif /* !CORBA_E_MICRO */
TAO_Root_POA *
TAO_Root_POA::new_POA (const String &name,
diff --git a/TAO/tao/PortableServer/get_arg.h b/TAO/tao/PortableServer/get_arg.h
index 1d0d05827b5..71edeef1282 100644
--- a/TAO/tao/PortableServer/get_arg.h
+++ b/TAO/tao/PortableServer/get_arg.h
@@ -44,7 +44,7 @@ namespace TAO
TAO::Argument * const * skel_args)
{
return
- (details != 0 && details->args () != 0)
+ (details != 0 && details->use_stub_args ())
? static_cast<typename TAO::Arg_Traits<T>::ret_val *> (
details->args ()[0])->arg ()
: static_cast<typename TAO::SArg_Traits<T>::ret_val *> (
@@ -59,7 +59,7 @@ namespace TAO
size_t i)
{
return
- (details != 0 && details->args () != 0)
+ (details != 0 && details->use_stub_args ())
? static_cast<typename TAO::Arg_Traits<T>::in_arg_val *> (
details->args ()[i])->arg ()
: static_cast<typename TAO::SArg_Traits<T>::in_arg_val *> (
@@ -74,7 +74,7 @@ namespace TAO
size_t i)
{
return
- (details != 0 && details->args () != 0)
+ (details != 0 && details->use_stub_args ())
? static_cast<typename TAO::Arg_Traits<T>::inout_arg_val *> (
details->args ()[i])->arg ()
: static_cast<typename TAO::SArg_Traits<T>::inout_arg_val *> (
@@ -89,7 +89,7 @@ namespace TAO
size_t i)
{
return
- (details != 0 && details->args () != 0)
+ (details != 0 && details->use_stub_args ())
? static_cast<typename TAO::Arg_Traits<T>::out_arg_val *> (
details->args ()[i])->arg ()
: static_cast<typename TAO::SArg_Traits<T>::out_arg_val *> (
diff --git a/TAO/tao/Service_Context.h b/TAO/tao/Service_Context.h
index dcf9cebbc4c..9a379d726f4 100644
--- a/TAO/tao/Service_Context.h
+++ b/TAO/tao/Service_Context.h
@@ -61,7 +61,7 @@ class TAO_Export TAO_Service_Context
{
public:
/// Declare FW_Server_Request_Wrapper a friend
- /// This friendship makes the FW_Server_Request_Wrapper be able to
+ /// This friendship makes the FW_Server_Request_Wrapper be able to
/// clone the TAO_Service_Context data member in TAO_ServerRequest.
friend class TAO::CSD::FW_Server_Request_Wrapper;
@@ -114,8 +114,8 @@ public:
void set_context (IOP::ServiceContext &context, TAO_OutputCDR &cdr);
/// Is the <id> available in the underlying service context list? If
- /// so return 1, else return 0
- int is_service_id (IOP::ServiceId id);
+ /// so return true, else return false
+ bool is_service_id (IOP::ServiceId id);
/// = Marshaling and demarshaling the list
int encode (TAO_OutputCDR& cdr) const;
diff --git a/TAO/tao/Service_Context.inl b/TAO/tao/Service_Context.inl
index 1facf7680a7..26988bc8d8b 100644
--- a/TAO/tao/Service_Context.inl
+++ b/TAO/tao/Service_Context.inl
@@ -39,7 +39,7 @@ TAO_Service_Context::set_context (IOP::ServiceContext &context,
cdr);
}
-ACE_INLINE int
+ACE_INLINE bool
TAO_Service_Context::is_service_id (IOP::ServiceId id)
{
for (CORBA::ULong i = 0;
@@ -48,10 +48,10 @@ TAO_Service_Context::is_service_id (IOP::ServiceId id)
{
if (id == this->service_context_[i].context_id)
{
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/extra_core.mpb b/TAO/tao/extra_core.mpb
index 8f9fcf5b15c..349f3e6cfdf 100644
--- a/TAO/tao/extra_core.mpb
+++ b/TAO/tao/extra_core.mpb
@@ -11,6 +11,5 @@ feature(corba_messaging) {
Source_Files(TAO_COMPONENTS) {
Policy_Manager.cpp
Buffering_Constraint_Policy.cpp
- Messaging_PolicyValueC.cpp
}
}
diff --git a/TAO/tao/operation_details.h b/TAO/tao/operation_details.h
index 3dcb97b5542..15fd2ed19bc 100644
--- a/TAO/tao/operation_details.h
+++ b/TAO/tao/operation_details.h
@@ -72,7 +72,6 @@ public:
/// Constructor
TAO_Operation_Details (const char *name,
CORBA::ULong len,
- CORBA::Boolean argument_flag,
TAO::Argument **args = 0,
CORBA::ULong num_args = 0,
TAO::Exception_Data *ex_data = 0,
@@ -156,11 +155,16 @@ public:
TAO::Exception_Data const * ex_data (void) const;
+ CORBA::Boolean use_stub_args (void) const;
+ void use_stub_args (CORBA::Boolean use_stub_arguments);
+
+#if TAO_HAS_INTERCEPTORS == 1
void ft_expiration_time (TimeBase::TimeT time);
TimeBase::TimeT ft_expiration_time (void) const;
void ft_retention_id (CORBA::Long request_id);
CORBA::Long ft_retention_id (void) const;
+#endif /*TAO_HAS_INTERCEPTORS == 1*/
private:
@@ -173,12 +177,6 @@ private:
/// Request ID of this operation.
CORBA::ULong request_id_;
- /**
- * Flag that indicates whether the operation has any arguments. If
- * there are arguments this flag is true, else false.
- */
- CORBA::Boolean argument_flag_;
-
/// Response flags
CORBA::Octet response_flags_;
@@ -207,6 +205,11 @@ private:
/// Count of the exceptions that operations can throw.
CORBA::ULong ex_count_;
+
+ /// Boolean flag to indicate whether in the skeletons the stub arguments
+ /// stored in these operation details should be used or not.
+ CORBA::Boolean use_stub_args_;
+
#if TAO_HAS_INTERCEPTORS == 1
/// FT request expiration time (absolute gregorian)
TimeBase::TimeT ft_expiration_time_;
diff --git a/TAO/tao/operation_details.inl b/TAO/tao/operation_details.inl
index a65462899cd..af624b2045c 100644
--- a/TAO/tao/operation_details.inl
+++ b/TAO/tao/operation_details.inl
@@ -7,7 +7,6 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL
ACE_INLINE
TAO_Operation_Details::TAO_Operation_Details (const char *name,
CORBA::ULong len,
- CORBA::Boolean argument_flag,
TAO::Argument **args,
CORBA::ULong num,
TAO::Exception_Data *data,
@@ -15,13 +14,13 @@ TAO_Operation_Details::TAO_Operation_Details (const char *name,
: opname_ (name)
, opname_len_ (len)
, request_id_ (0)
- , argument_flag_ (argument_flag)
, response_flags_ (0)
, addressing_mode_ (TAO_Target_Specification::Key_Addr)
, args_ (args)
, num_args_ (num)
, ex_data_ (data)
, ex_count_ (count)
+ , use_stub_args_ (args ? true : false)
#if TAO_HAS_INTERCEPTORS == 1
, ft_expiration_time_ (0)
, ft_retention_id_ (0)
@@ -44,7 +43,7 @@ TAO_Operation_Details::opname_len (void) const
ACE_INLINE CORBA::Boolean
TAO_Operation_Details::argument_flag (void) const
{
- return this->argument_flag_;
+ return (this->num_args_ > 1);
}
ACE_INLINE TAO_Service_Context &
@@ -171,6 +170,18 @@ TAO_Operation_Details::args_num (void) const
return this->num_args_;
}
+ACE_INLINE CORBA::Boolean
+TAO_Operation_Details::use_stub_args (void) const
+{
+ return this->use_stub_args_;
+}
+
+ACE_INLINE void
+TAO_Operation_Details::use_stub_args (CORBA::Boolean use_stub_args)
+{
+ this->use_stub_args_ = use_stub_args;
+}
+
#if TAO_HAS_INTERCEPTORS == 1
ACE_INLINE void
TAO_Operation_Details::ft_expiration_time (TimeBase::TimeT time)