summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2006-10-26 23:10:58 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2006-10-26 23:10:58 +0000
commit0dbcde06f38743ecef5374134fc8616547c74068 (patch)
tree15c287d2ae659eaa0e935c036b15c4e9a62dba46
parenta229b602e5d3196b5b54f045e74ab0ad7d978be0 (diff)
downloadATCD-0dbcde06f38743ecef5374134fc8616547c74068.tar.gz
ChangeLogTag:Thu Oct 27 01:59:19 UTC 2006 Ossama Othman <ossama_othman at symantec dot com>
-rw-r--r--TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.h5
-rw-r--r--TAO/tao/GIOP_Message_Base.cpp43
-rw-r--r--TAO/tao/ORB.cpp19
-rwxr-xr-xTAO/tao/PortableServer/Servant_var.h4
-rw-r--r--TAO/tao/Strategies/SHMIOP_Acceptor.cpp2
-rw-r--r--TAO/tao/Strategies/SHMIOP_Acceptor.h4
-rw-r--r--TAO/tao/Strategies/SHMIOP_Factory.h2
-rw-r--r--TAO/tao/Strategies/advanced_resource.cpp42
-rw-r--r--TAO/tao/Strategies/advanced_resource.h5
-rw-r--r--TAO/tao/Valuetype/ValueBase.cpp35
10 files changed, 100 insertions, 61 deletions
diff --git a/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.h b/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.h
index d198402cc5e..5eea21c1e1b 100644
--- a/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.h
+++ b/TAO/tao/EndpointPolicy/Endpoint_Acceptor_Filter.h
@@ -28,11 +28,10 @@
#include "tao/PortableServer/Default_Acceptor_Filter.h"
#include "tao/EndpointPolicy/EndpointPolicyC.h"
-class TAO_POA_Manager;
-
-
TAO_BEGIN_VERSIONED_NAMESPACE_DECL
+class TAO_POA_Manager;
+
//=============================================================================
/**
* @class TAO_Endpoint_Acceptor_Filter
diff --git a/TAO/tao/GIOP_Message_Base.cpp b/TAO/tao/GIOP_Message_Base.cpp
index 97575e5d72b..397044bea1b 100644
--- a/TAO/tao/GIOP_Message_Base.cpp
+++ b/TAO/tao/GIOP_Message_Base.cpp
@@ -1797,7 +1797,6 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd,
db = qd->msg_block_->data_block ()->duplicate ();
}
-
TAO_InputCDR input_cdr (db,
flg,
rd_pos,
@@ -1815,32 +1814,20 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd,
{
IOP::ServiceContextList service_context;
- if ( ! (input_cdr >> service_context))
- {
- return -1;
- }
-
- if ( ! (input_cdr >> request_id))
+ if ((input_cdr >> service_context)
+ && (input_cdr >> request_id))
{
- return -1;
+ return 0;
}
-
- return 0;
}
else if (qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_CANCELREQUEST ||
qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST ||
qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_LOCATEREPLY)
{
- if ( ! (input_cdr >> request_id) )
+ if ((input_cdr >> request_id))
{
- return -1;
+ return 0;
}
-
- return 0;
- }
- else
- {
- return -1;
}
}
else
@@ -1852,18 +1839,14 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd,
qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_LOCATEREQUEST ||
qd->msg_type_ == TAO_PLUGGABLE_MESSAGE_LOCATEREPLY)
{
- // Dealing with GIOP-1.2, the request-id is located directly behind the GIOP-Header.
- // This is true for all message types that might be sent in form of fragments or cancel-requests.
- if ( ! (input_cdr >> request_id) )
+ // Dealing with GIOP-1.2, the request-id is located directly
+ // behind the GIOP-Header. This is true for all message
+ // types that might be sent in form of fragments or
+ // cancel-requests.
+ if ((input_cdr >> request_id))
{
- return -1;
+ return 0;
}
-
- return 0;
- }
- else
- {
- return -1;
}
}
@@ -1872,7 +1855,9 @@ TAO_GIOP_Message_Base::parse_request_id (const TAO_Queued_Data *qd,
/* @return -1 error, 0 ok, +1 outstanding fragments */
int
-TAO_GIOP_Message_Base::consolidate_fragmented_message (TAO_Queued_Data *qd, TAO_Queued_Data *&msg)
+TAO_GIOP_Message_Base::consolidate_fragmented_message (
+ TAO_Queued_Data * qd,
+ TAO_Queued_Data *& msg)
{
TAO::Incoming_Message_Stack reverse_stack;
diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp
index cef6cc634ab..559b128b7a6 100644
--- a/TAO/tao/ORB.cpp
+++ b/TAO/tao/ORB.cpp
@@ -1305,7 +1305,7 @@ TAO::ORB::init_orb_globals (ACE_ENV_SINGLE_ARG_DECL)
CORBA::ORB_ptr
CORBA::ORB::_tao_make_ORB (TAO_ORB_Core * orb_core)
{
- CORBA::ORB_ptr orb = CORBA::ORB::_nil ();
+ CORBA::ORB_ptr orb = CORBA::ORB_ptr ();
ACE_NEW_RETURN (orb,
CORBA::ORB (orb_core),
@@ -1323,10 +1323,27 @@ CORBA::ORB_init (int &argc,
char *argv[],
const char *orb_name)
{
+#ifndef ACE_HAS_EXCEPTIONS
+ // Make sure TAO's singleton manager is initialized.
+ //
+ // We need to initialize before TAO_default_environment() is called
+ // since that call instantiates a TAO_TSS_Singleton.
+ if (TAO_Singleton_Manager::instance ()->init () == -1)
+ {
+ return CORBA::ORB::_nil ();
+ }
+
return CORBA::ORB_init (argc,
argv,
orb_name,
TAO_default_environment ());
+#else
+ CORBA::Environment env;
+ return CORBA::ORB_init (argc,
+ argv,
+ orb_name,
+ env /* unused */);
+#endif /* !ACE_HAS_EXCEPTIONS */
}
CORBA::ORB_ptr
diff --git a/TAO/tao/PortableServer/Servant_var.h b/TAO/tao/PortableServer/Servant_var.h
index a734e1e018e..5004ae93159 100755
--- a/TAO/tao/PortableServer/Servant_var.h
+++ b/TAO/tao/PortableServer/Servant_var.h
@@ -133,8 +133,8 @@ namespace PortableServer
* It is safe to pass in a null pointer, the pointer is simply
* returned in that case.
*
- * @todo We might want to add a throw spec and catch all (potential)
- * exceptions in _add_ref()
+ * @todo We might want to catch all (potential) exceptions in
+ * _add_ref().
*
* @todo It might be useful to add a _release() method that handles
* any potential exceptions...
diff --git a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
index 895df2ad9b2..fa502e57458 100644
--- a/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
+++ b/TAO/tao/Strategies/SHMIOP_Acceptor.cpp
@@ -238,7 +238,7 @@ TAO_SHMIOP_Acceptor::open_default (TAO_ORB_Core *orb_core,
int
TAO_SHMIOP_Acceptor::set_mmap_options (const ACE_TCHAR *prefix,
- off_t size)
+ ACE_OFF_T size)
{
this->mmap_file_prefix_ = prefix;
this->mmap_size_ = size;
diff --git a/TAO/tao/Strategies/SHMIOP_Acceptor.h b/TAO/tao/Strategies/SHMIOP_Acceptor.h
index acb57ed33fe..d48b2ec0326 100644
--- a/TAO/tao/Strategies/SHMIOP_Acceptor.h
+++ b/TAO/tao/Strategies/SHMIOP_Acceptor.h
@@ -87,7 +87,7 @@ public:
/// Set the MMAP options the MEM_Stream this acceptor creates will
/// use.
int set_mmap_options (const ACE_TCHAR *prefix,
- off_t size);
+ ACE_OFF_T size);
private:
/// Implement the common part of the open*() methods.
@@ -139,7 +139,7 @@ private:
/// Determine the minimum size of mmap file. This dictate the
/// maximum size of a CORBA method invocation.
- off_t mmap_size_;
+ ACE_OFF_T mmap_size_;
/// Should we use GIOP lite??
CORBA::Boolean lite_flag_;
diff --git a/TAO/tao/Strategies/SHMIOP_Factory.h b/TAO/tao/Strategies/SHMIOP_Factory.h
index 382282475b6..3f063f0ef4a 100644
--- a/TAO/tao/Strategies/SHMIOP_Factory.h
+++ b/TAO/tao/Strategies/SHMIOP_Factory.h
@@ -79,7 +79,7 @@ private:
ACE_TCHAR *mmap_prefix_;
/// Minimum bytes of the mmap files.
- off_t min_bytes_;
+ ACE_OFF_T min_bytes_;
};
TAO_END_VERSIONED_NAMESPACE_DECL
diff --git a/TAO/tao/Strategies/advanced_resource.cpp b/TAO/tao/Strategies/advanced_resource.cpp
index f440e60cc8e..5108af3cdd4 100644
--- a/TAO/tao/Strategies/advanced_resource.cpp
+++ b/TAO/tao/Strategies/advanced_resource.cpp
@@ -29,6 +29,7 @@
#include "ace/WFMO_Reactor.h"
#include "ace/Msg_WFMO_Reactor.h"
#include "ace/TP_Reactor.h"
+#include "ace/Dev_Poll_Reactor.h"
#include "ace/Malloc_T.h"
#include "ace/Local_Memory_Pool.h"
#include "ace/Null_Mutex.h"
@@ -164,15 +165,26 @@ TAO_Advanced_Resource_Factory::init (int argc, ACE_TCHAR** argv)
#endif /* ACE_WIN32 */
else if (ACE_OS::strcasecmp (current_arg,
ACE_TEXT("msg_wfmo")) == 0)
-#if defined(ACE_WIN32)
+#if defined(ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO)
this->reactor_type_ = TAO_REACTOR_MSGWFMO;
#else
this->report_unsupported_error (ACE_TEXT("MsgWFMO Reactor"));
-#endif /* ACE_WIN32 */
+#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */
else if (ACE_OS::strcasecmp (current_arg,
ACE_TEXT("tp")) == 0)
this->reactor_type_ = TAO_REACTOR_TP;
+
+ else if (ACE_OS::strcasecmp (current_arg,
+ ACE_TEXT("dev_poll")) == 0)
+ {
+#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL)
+ this->reactor_type_ = TAO_REACTOR_DEV_POLL;
+#else
+ this->report_unsupported_error (ACE_TEXT ("Dev_Poll Reactor"));
+#endif /* ACE_HAS_EVENT_POLL || ACE_HAS_DEV_POLL */
+ }
+
else if (ACE_OS::strcasecmp (current_arg,
ACE_TEXT("fl")) == 0)
this->report_option_value_error (
@@ -431,16 +443,34 @@ TAO_Advanced_Resource_Factory::allocate_reactor_impl (void) const
break;
case TAO_REACTOR_WFMO:
-#if defined(ACE_WIN32) && !defined (ACE_LACKS_MSG_WFMO)
+#if defined(ACE_WIN32)
ACE_NEW_RETURN (impl, ACE_WFMO_Reactor, 0);
-#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */
+#endif /* ACE_WIN32 */
break;
+#if defined(ACE_WIN32) \
+ && !defined (ACE_LACKS_MSG_WFMO) \
+ && !defined (ACE_HAS_WINCE) \
+ && !defined (ACE_HAS_PHARLAP)
case TAO_REACTOR_MSGWFMO:
-#if defined(ACE_WIN32) && !defined (ACE_HAS_WINCE) && !defined (ACE_HAS_PHARLAP)
ACE_NEW_RETURN (impl, ACE_Msg_WFMO_Reactor, 0);
-#endif /* ACE_WIN32 && !ACE_HAS_WINCE */
break;
+#endif /* ACE_WIN32 && !ACE_LACKS_MSG_WFMO */
+
+#if defined (ACE_HAS_EVENT_POLL) || defined (ACE_HAS_DEV_POLL)
+ case TAO_REACTOR_DEV_POLL:
+ ACE_NEW_RETURN (impl,
+ ACE_Dev_Poll_Reactor (ACE::max_handles (),
+ 1, // restart
+ (ACE_Sig_Handler*)0,
+ (ACE_Timer_Queue*)0,
+ 0, // Do not disable notify
+ 0, // Allocate notify handler
+ this->reactor_mask_signals_,
+ ACE_Select_Reactor_Token::LIFO),
+ 0);
+ break;
+#endif /* ACE_HAS_EVENT_POLL || ACE_HAS_DEV_POLL */
default:
case TAO_REACTOR_TP:
diff --git a/TAO/tao/Strategies/advanced_resource.h b/TAO/tao/Strategies/advanced_resource.h
index 98dde1143d3..d8befc55809 100644
--- a/TAO/tao/Strategies/advanced_resource.h
+++ b/TAO/tao/Strategies/advanced_resource.h
@@ -1,3 +1,5 @@
+// -*- C++ -*-
+//
// $Id$
#ifndef TAO_ADVANCED_RESOURCE_H
@@ -65,7 +67,8 @@ public:
TAO_REACTOR_SELECT_ST = 2,
TAO_REACTOR_WFMO = 3,
TAO_REACTOR_MSGWFMO = 4,
- TAO_REACTOR_TP = 5
+ TAO_REACTOR_TP = 5,
+ TAO_REACTOR_DEV_POLL = 6
};
/// Thread queueing Strategy
diff --git a/TAO/tao/Valuetype/ValueBase.cpp b/TAO/tao/Valuetype/ValueBase.cpp
index 58e5512d413..702fcc826b4 100644
--- a/TAO/tao/Valuetype/ValueBase.cpp
+++ b/TAO/tao/Valuetype/ValueBase.cpp
@@ -456,9 +456,9 @@ CORBA::ValueBase::_tao_write_value(TAO_OutputCDR &strm,
CORBA::Boolean
CORBA::ValueBase::_tao_write_value_header(TAO_OutputCDR &strm,
- ptrdiff_t formal_type_id) const
+ ptrdiff_t formal_type_id) const
{
-#if defined (TAO_HAS_OPTIMIZED_VALUETYPE_MARSHALING)
+#ifdef TAO_HAS_OPTIMIZED_VALUETYPE_MARSHALING
// this case allows TAO to avoid marshaling the typeID for values
// where the actual type matches the formal type (ie not a derived
// type).
@@ -475,15 +475,15 @@ CORBA::ValueBase::_tao_write_value_header(TAO_OutputCDR &strm,
// support unmarshaling of valuetypes that did not explicitly
// marshal the type id. At least it is benign to always encode the
// typecode value, even if it can be a little verbose.
- CORBA::Boolean const is_formal_type =
- false;
+ CORBA::Boolean const is_formal_type = false;
ACE_UNUSED_ARG (formal_type_id);
#endif /* TAO_HAS_OPTIMIZED_VALUETYPE_MARSHALING */
// Get the list of repository ids for this valuetype.
Repository_Id_List repository_ids;
this->_tao_obv_truncatable_repo_ids (repository_ids);
- CORBA::Long const num_ids = static_cast <CORBA::Long> (repository_ids.size ());
+ CORBA::Long const num_ids =
+ static_cast <CORBA::Long> (repository_ids.size ());
// Build <value-tag>, which states if chunking is used
// and if type information ((list of) repository id(s))
@@ -502,24 +502,29 @@ CORBA::ValueBase::_tao_write_value_header(TAO_OutputCDR &strm,
if (num_ids > 1)
valuetag |= TAO_OBV_GIOP_Flags::Type_info_list;
- // Write <value-tag>.
- if (!strm.write_long (valuetag))
- return false;
-
- if (num_ids > 1 && !strm.write_long (num_ids))
- return false;
-
- if (this->is_truncatable_ ||
- !is_formal_type ||
- num_ids > 1)
+ if (! strm.write_long (valuetag) // Write <value-tag>.
+ || (num_ids > 1 && !strm.write_long (num_ids))) // Write <num-ids>.
{
+ return false;
+ }
+
+#ifndef TAO_HAS_OPTIMIMIZED_VALUETYPE_MARSHALING
+ if (this->is_truncatable_
+ || !is_formal_type /* Always evaluates to true in the
+ !TAO_HAS_OPTIMIMIZED_VALUETYPE_MARSHALING
+ case */
+ || num_ids > 1)
+ {
+#endif /* !TAO_HAS_OPTIMIMIZED_VALUETYPE_MARSHALING */
// Marshal type information.
for( CORBA::Long i = 0; i < num_ids; ++i )
{
if (! strm.write_string (repository_ids[i]))
return false;
}
+#ifndef TAO_HAS_OPTIMIMIZED_VALUETYPE_MARSHALING
}
+#endif /* !TAO_HAS_OPTIMIMIZED_VALUETYPE_MARSHALING */
return true;
}