summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-08-11 15:06:18 +0000
committercoryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-08-11 15:06:18 +0000
commitccfec5b680a6af3f6a03530ee6c5fe2d6a3309ec (patch)
tree97be145d3c87031a2bb2bf27aee430c5eb6f4b22
parent6fe4a5ae09087ff6949c40ef87878ea1938ed8f6 (diff)
downloadATCD-ccfec5b680a6af3f6a03530ee6c5fe2d6a3309ec.tar.gz
ChangeLogTag:Wed Aug 11 10:04:57 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
-rw-r--r--TAO/ChangeLog-99c22
-rw-r--r--TAO/examples/Event_Comm/Consumer_Handler.cpp10
-rw-r--r--TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp6
-rw-r--r--TAO/examples/POA/Default_Servant/File_i.cpp2
-rw-r--r--TAO/examples/Quoter/server.cpp2
-rw-r--r--TAO/examples/Simple/bank/AccountManager_i.cpp2
-rw-r--r--TAO/examples/Simple/bank/Account_i.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp6
-rw-r--r--TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp3
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp6
-rw-r--r--TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp4
-rw-r--r--TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp96
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp2
-rw-r--r--TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp12
-rw-r--r--TAO/orbsvcs/tests/Event/Basic/BCast.cpp11
-rw-r--r--TAO/orbsvcs/tests/Event/Basic/BCast.h3
-rw-r--r--TAO/performance-tests/Thruput/TAO/utils.cpp17
-rw-r--r--TAO/utils/nslist/nslist.cpp8
19 files changed, 127 insertions, 91 deletions
diff --git a/TAO/ChangeLog-99c b/TAO/ChangeLog-99c
index 809fa768ba5..2134081b8c5 100644
--- a/TAO/ChangeLog-99c
+++ b/TAO/ChangeLog-99c
@@ -1,3 +1,25 @@
+Wed Aug 11 10:04:57 1999 Carlos O'Ryan <coryan@cs.wustl.edu>
+
+ * examples/Event_Comm/Consumer_Handler.cpp:
+ * examples/OBV/Typed_Events/Event_Types_impl.cpp:
+ * examples/POA/Default_Servant/File_i.cpp:
+ * examples/Quoter/server.cpp:
+ * examples/Simple/bank/AccountManager_i.cpp:
+ * examples/Simple/bank/Account_i.cpp:
+ * orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp:
+ * orbsvcs/orbsvcs/Event/RT_Task.cpp:
+ * orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp:
+ * orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp:
+ * orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp:
+ * orbsvcs/orbsvcs/Trader/Offer_Database.cpp:
+ * orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp:
+ * orbsvcs/orbsvcs/Trader/Trader_Utils.cpp:
+ * orbsvcs/tests/Event/Basic/BCast.cpp:
+ * orbsvcs/tests/Event/Basic/BCast.h:
+ * performance-tests/Thruput/TAO/utils.cpp:
+ * utils/nslist/nslist.cpp:
+ Fixed several warnings under gcc-2.95
+
Wed Aug 11 09:18:53 1999 Nanbor Wang <nanbor@cs.wustl.edu>
The following changes are used to surface the ServiceContextList
diff --git a/TAO/examples/Event_Comm/Consumer_Handler.cpp b/TAO/examples/Event_Comm/Consumer_Handler.cpp
index 4435354426e..46a30a7d912 100644
--- a/TAO/examples/Event_Comm/Consumer_Handler.cpp
+++ b/TAO/examples/Event_Comm/Consumer_Handler.cpp
@@ -77,7 +77,7 @@ Consumer_Handler::init (int argc,
-1);
// Subscribe ourselves with the notifier's broker.
- this->notifier_->subscribe (this->receiver_,
+ this->notifier_->subscribe (this->receiver_.in (),
filtering_criteria,
ACE_TRY_ENV);
}
@@ -164,14 +164,14 @@ Consumer_Handler::reactor(void)
return TAO_ORB_Core_instance ()->reactor ();
}
-Event_Comm::Consumer *
+Event_Comm::Consumer_ptr
Consumer_Handler::receiver (void)
{
- return this->receiver_;
+ return this->receiver_.in ();
}
-Event_Comm::Notifier *
+Event_Comm::Notifier_ptr
Consumer_Handler::notifier (void)
{
- return this->notifier_;
+ return this->notifier_.in ();
}
diff --git a/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp b/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp
index 08306339676..101e58d964d 100644
--- a/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp
+++ b/TAO/examples/OBV/Typed_Events/Event_Types_impl.cpp
@@ -305,7 +305,7 @@ Event_List_Iterator::init (Event_List *list)
CORBA::Boolean
Event_List_Iterator::next (Event_var &next)
{
- if (current_)
+ if (this->current_.in ())
{
Event *e = current_->get_event ();
CORBA::add_ref (e);
@@ -321,7 +321,7 @@ Event_List_Iterator::next (Event_var &next)
Event *
Event_List_Iterator::next ()
{
- if (current_)
+ if (this->current_.in ())
{
return current_->get_event ();
}
@@ -331,7 +331,7 @@ Event_List_Iterator::next ()
void
Event_List_Iterator::advance ()
{
- if (current_)
+ if (this->current_.in ())
{
Event_List_Link *tmp = current_->get_next_link ();
CORBA::add_ref (tmp);
diff --git a/TAO/examples/POA/Default_Servant/File_i.cpp b/TAO/examples/POA/Default_Servant/File_i.cpp
index 5db5f5a5e07..3e7e3694411 100644
--- a/TAO/examples/POA/Default_Servant/File_i.cpp
+++ b/TAO/examples/POA/Default_Servant/File_i.cpp
@@ -68,7 +68,7 @@ FileImpl::System::open (const char *file_name,
// convert ACE_HANDLE to a string
ACE_OS::sprintf (file_descriptor_buffer,
"%ld",
- (CORBA::Long) file_descriptor);
+ CORBA::Long(file_descriptor));
//Create an objectID from the ACE_HANDLE string
PortableServer::ObjectId_var oid =
diff --git a/TAO/examples/Quoter/server.cpp b/TAO/examples/Quoter/server.cpp
index f954ca72f1f..dd78475d4e6 100644
--- a/TAO/examples/Quoter/server.cpp
+++ b/TAO/examples/Quoter/server.cpp
@@ -192,7 +192,7 @@ Quoter_Server::init_naming_service (CORBA::Environment &ACE_TRY_ENV)
exception_message = "While binding factory";
quoterNameContext->bind (quoterFactoryContextName,
- quoter_factory_var,
+ quoter_factory_var.in (),
ACE_TRY_ENV);
ACE_TRY_CHECK;
}
diff --git a/TAO/examples/Simple/bank/AccountManager_i.cpp b/TAO/examples/Simple/bank/AccountManager_i.cpp
index 6de2d000699..079e5f88d10 100644
--- a/TAO/examples/Simple/bank/AccountManager_i.cpp
+++ b/TAO/examples/Simple/bank/AccountManager_i.cpp
@@ -108,7 +108,7 @@ AccountManager_i::close (Bank::Account_ptr account,
ACE_TRY_CHECK;
- if (hash_map_.unbind ((const char *) name) == -1)
+ if (hash_map_.unbind (name.in ()) == -1)
{
if (TAO_debug_level > 0)
ACE_DEBUG((LM_DEBUG,
diff --git a/TAO/examples/Simple/bank/Account_i.cpp b/TAO/examples/Simple/bank/Account_i.cpp
index 0b0cf0d338f..e889fea0c2c 100644
--- a/TAO/examples/Simple/bank/Account_i.cpp
+++ b/TAO/examples/Simple/bank/Account_i.cpp
@@ -67,7 +67,7 @@ char *
Account_i::name (CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- return CORBA::string_dup (name_);
+ return CORBA::string_dup (this->name_.in ());
}
void
@@ -75,5 +75,5 @@ Account_i::name (const char *name,
CORBA::Environment &)
ACE_THROW_SPEC ((CORBA::SystemException))
{
- name_ = CORBA::string_dup (name);
+ this->name_ = CORBA::string_dup (name);
}
diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp
index e64ab459884..087dc424555 100644
--- a/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/EC_Sched_Filter_Builder.cpp
@@ -150,7 +150,8 @@ TAO_EC_Sched_Filter_Builder::recursive_build (
// @@ We need a unique name for each timeout, assigned by the
// application?
char buf[64];
- ACE_OS::sprintf (buf, "TIMEOUT:%ul", e.header.creation_time);
+ ACE_OS::sprintf (buf, "TIMEOUT:%ul",
+ ACE_CU64_TO_CU32 (e.header.creation_time / 10000));
ACE_CString name = buf;
TAO_EC_QOS_Info qos_info;
@@ -288,7 +289,8 @@ TAO_EC_Sched_Filter_Builder:: recursive_name (
pos++;
char buf[64];
- ACE_OS::sprintf (buf, "TIMEOUT:%ul", e.header.creation_time);
+ ACE_OS::sprintf (buf, "TIMEOUT:%ul",
+ ACE_CU64_TO_CU32 (e.header.creation_time / 10000));
name = buf;
return;
diff --git a/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp b/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
index 76fd32baf95..84a568a6497 100644
--- a/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
+++ b/TAO/orbsvcs/orbsvcs/Event/RT_Task.cpp
@@ -251,7 +251,8 @@ ACE_RT_Task::open_task (const char* name)
char tempbuffer[64];
if (tempname == 0)
{
- ACE_OS::sprintf (tempbuffer, "unnamed task %d", (long) this);
+ ACE_OS::sprintf (tempbuffer,
+ "unnamed task %lx", (long) this);
tempname = tempbuffer;
}
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp
index 6542dc39e89..5dc5068f02d 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Persistent_Naming_Context.cpp
@@ -171,7 +171,7 @@ TAO_Persistent_Bindings_Map::shared_bind (const char * id,
// object binding.
size_t id_len = ACE_OS::strlen (id) + 1;
size_t kind_len = ACE_OS::strlen (kind) + 1;
- size_t ref_len = ACE_OS::strlen (ref) + 1;
+ size_t ref_len = ACE_OS::strlen (ref.in ()) + 1;
size_t total_len = id_len + kind_len + ref_len;
char *ptr = (char *) this->allocator_->malloc (total_len);
@@ -407,7 +407,7 @@ TAO_Persistent_Naming_Context::new_context (CORBA::Environment &ACE_TRY_ENV)
// Generate a POA id for the new context.
char poa_id[BUFSIZ];
ACE_OS::sprintf (poa_id,
- "%s_%ld",
+ "%s_%d",
this->poa_id_.c_str (),
(*this->counter_)++);
@@ -520,7 +520,7 @@ TAO_Persistent_Naming_Context::list (CORBA::ULong how_many,
// Register with the POA.
char poa_id[BUFSIZ];
ACE_OS::sprintf (poa_id,
- "%s_%ld",
+ "%s_%d",
this->poa_id_.c_str (),
this->counter_++);
PortableServer::ObjectId_var id =
diff --git a/TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp b/TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp
index 7d68701e129..95354d02edf 100644
--- a/TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp
+++ b/TAO/orbsvcs/orbsvcs/Naming/Transient_Naming_Context.cpp
@@ -208,7 +208,7 @@ TAO_Transient_Naming_Context::new_context (CORBA::Environment &ACE_TRY_ENV)
// Generate a POA id for the new context.
char poa_id[BUFSIZ];
ACE_OS::sprintf (poa_id,
- "%s_%ld",
+ "%s_%d",
this->poa_id_.c_str (),
this->counter_++);
@@ -321,7 +321,7 @@ TAO_Transient_Naming_Context::list (CORBA::ULong how_many,
// Register with the POA.
char poa_id[BUFSIZ];
ACE_OS::sprintf (poa_id,
- "%s_%ld",
+ "%s_%d",
this->poa_id_.c_str (),
this->counter_++);
PortableServer::ObjectId_var id =
diff --git a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp
index 1f8d2831d20..fad8b11290e 100644
--- a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp
+++ b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.cpp
@@ -134,7 +134,7 @@ TAO_PropertySetFactory::create_constrained_propertyset (const CosPropertyService
ACE_TRY_ENV),
0);
ACE_TRY_CHECK;
-
+
// Successful, store this in the products sequence.
size_t products_len = this->propertyset_products_.length ();
this->propertyset_products_.length (products_len + 1);
@@ -162,7 +162,7 @@ TAO_PropertySetFactory::create_constrained_propertyset (const CosPropertyService
}
ACE_ENDTRY;
ACE_CHECK_RETURN (0);
-
+
return propset_ptr;
}
@@ -252,11 +252,11 @@ TAO_PropertySetDefFactory::create_propertysetdef (CORBA::Environment &ACE_TRY_EN
size_t cur_len = this->propertysetdef_products_.length ();
this->propertysetdef_products_.length (cur_len + 1);
this->propertysetdef_products_[cur_len] = new_set;
-
- CosPropertyService::PropertySetDef_ptr propsetdef_ptr =
+
+ CosPropertyService::PropertySetDef_ptr propsetdef_ptr =
new_set->_this (ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
-
+
return propsetdef_ptr;
}
@@ -269,7 +269,7 @@ TAO_PropertySetDefFactory::create_constrained_propertysetdef (const CosPropertyS
{
TAO_PropertySetDef *new_set = 0;
CosPropertyService::PropertySetDef_ptr propsetdef_ptr = 0;
-
+
ACE_TRY
{
// New a TAO_PropertySetDef using these constraints.
@@ -307,7 +307,7 @@ TAO_PropertySetDefFactory::create_constrained_propertysetdef (const CosPropertyS
}
ACE_ENDTRY;
ACE_CHECK_RETURN (0);
-
+
return propsetdef_ptr;
}
@@ -359,7 +359,7 @@ TAO_PropertySetDefFactory::create_initial_propertysetdef (const CosPropertyServi
}
ACE_ENDTRY;
ACE_CHECK_RETURN (0);
-
+
return propsetdef_ptr;
}
@@ -452,7 +452,7 @@ TAO_PropertySet::~TAO_PropertySet (void)
// Function to modify or add a property to the PropertySet:
// Adds the name and the value to the set... Doesn't check for Typecode
-// overwriting, duplicate names, void names etc, yet.
+// overwriting, duplicate names, void names etc, yet.
// @@ Uses Normal mode as the default mode of properties, We can
// change this behavior based on the Initial set of allowed modes, if
// there is anything like that set by the client.
@@ -551,8 +551,8 @@ TAO_PropertySet::is_type_allowed (CORBA::TypeCode_ptr type)
{
ACE_TRY
{
- ret_val = ((const CORBA::TypeCode *)this->allowed_property_types_[ti])->equal (type,
- ACE_TRY_ENV);
+ ret_val = this->allowed_property_types_[ti]->equal (type,
+ ACE_TRY_ENV);
ACE_TRY_CHECK;
if (ret_val == 1)
@@ -710,7 +710,7 @@ TAO_PropertySet::get_all_property_names (CORBA::ULong how_many,
size_t num_of_properties =
this->get_number_of_properties (ACE_TRY_ENV);
ACE_CHECK;
-
+
if (num_of_properties == 0)
// Nothing to do.
return;
@@ -757,11 +757,11 @@ TAO_PropertySet::get_all_property_names (CORBA::ULong how_many,
entry_ptr->int_id_) < 0)
ACE_DEBUG ((LM_DEBUG,
"Error:TAO_PropertySet::get_all_property_names\n"));
-
+
// Make the NamesIterator out of this TAO_PropertySet.
TAO_PropertyNamesIterator *names_iterator;
ACE_NEW (names_iterator, TAO_PropertyNamesIterator (*property_set));
-
+
// Init the out parameter.
// Get the Interface ptr.
@@ -814,7 +814,7 @@ TAO_PropertySet::get_property_value (const char *property_name,
// Returns the values of the properties listed in property_names. When
// the boolean return value is true, the Properties parameter contains
-// valid values for all requested property names. If false, then all
+// valid values for all requested property names. If false, then all
// properties with a value of type tk_void may have failed due to
// <PropertyNotFound> or <InvalidPropertyName>.
@@ -848,7 +848,7 @@ TAO_PropertySet::get_properties (const CosPropertyService::PropertyNames &proper
any_ptr = get_property_value (property_names [i],
ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
-
+
if (any_ptr != 0)
{
// Property is found.
@@ -859,14 +859,14 @@ TAO_PropertySet::get_properties (const CosPropertyService::PropertyNames &proper
{
// Invalid name. Ret value is False.
ret_val = 0;
-
+
// Assign void type to this name in the out parameter.
nproperties [i].property_name =
property_names [i];
// Make an any value with tk_void type.
- // @@ Using replace method, <<= operator does not exist yet
- // for this.
+ // @@ Using replace method, <<= operator does not exist yet
+ // for this.
nproperties [i].property_value.replace (CORBA::_tc_void,
0,
0,
@@ -906,7 +906,7 @@ TAO_PropertySet::get_all_properties (CORBA::ULong how_many,
sequence_length = num_of_properties;
else
sequence_length = how_many;
-
+
nproperties->length (sequence_length);
}
@@ -928,7 +928,7 @@ TAO_PropertySet::get_all_properties (CORBA::ULong how_many,
}
// If there are more properties, put them in the <PropertiesIterator>.
- // Make a new <TAO_PropertySet> and use that to create an Properties
+ // Make a new <TAO_PropertySet> and use that to create an Properties
// iterator. put that in a iterator and assign that to the out
// paramerter.
@@ -948,25 +948,25 @@ TAO_PropertySet::get_all_properties (CORBA::ULong how_many,
ACE_DEBUG ((LM_DEBUG,
"Error:TAO_PropertySet::get_all_properties\n"));
}
-
+
// Make the iterator out of the new TAO_Propset.
TAO_PropertiesIterator *iterator = 0;
ACE_NEW (iterator,
TAO_PropertiesIterator (*prop_set));
-
+
// Init the out parameter.
-
+
// Get the interface ptr.
- CosPropertyService::PropertiesIterator_ptr iterator_ptr =
+ CosPropertyService::PropertiesIterator_ptr iterator_ptr =
iterator->_this (ACE_TRY_ENV);
ACE_CHECK;
-
+
// POA stuff todo here, since we have <destroy> method in the
// <NamesIterator> interface.
// Give ownership of this servant to the POA.
iterator->_remove_ref (ACE_TRY_ENV);
ACE_CHECK;
-
+
// Init the out parameter.
rest = iterator_ptr;
}
@@ -1000,13 +1000,13 @@ TAO_PropertySet::delete_property (const char *property_name,
if ((entry_ptr->int_id_.pmode_ == CosPropertyService::fixed_normal)
|| (entry_ptr->int_id_.pmode_ == CosPropertyService::fixed_readonly))
ACE_THROW (CosPropertyService::FixedProperty());
-
+
// Unbind this property.
if (this->hash_table_.unbind (entry_ptr) != 0)
{
ACE_THROW (CORBA::UNKNOWN ());
}
-
+
return;
}
@@ -1098,25 +1098,25 @@ TAO_PropertySet::delete_all_properties (CORBA::Environment &ACE_TRY_ENV)
CosPropertyService::PropertyNamesIterator_ptr iter_ptr = 0;
CosPropertyService::PropertyNamesIterator_out iter_out (iter_ptr);
CosPropertyService::PropertyNamesIterator_var iter;
-
+
CORBA::ULong size = this->get_number_of_properties (ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
-
+
this->get_all_property_names (size,
names_out,
iter_out,
ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
-
+
// Get the out values on to the var varibles.
names = names_out.ptr ();
iter = iter_out.ptr ();
-
+
// Delete all these properties.
this->delete_properties (names.in (),
ACE_TRY_ENV);
ACE_CHECK_RETURN (0);
-
+
// All properties deleted.
return 1;
}
@@ -1131,7 +1131,7 @@ TAO_PropertySet::is_property_defined (const char *property_name,
CosPropertyService::InvalidPropertyName))
{
CosProperty_Hash_Key hash_key (property_name);
-
+
if (this->hash_table_.find (hash_key) == 0)
return 1;
else
@@ -1169,7 +1169,7 @@ TAO_PropertySetDef::TAO_PropertySetDef (const CosPropertyService::PropertyTypes
for (size_t ni = 0; ni < allowed_property_defs.length (); ni++)
this->allowed_property_names_[ni] =
allowed_property_defs[ni].property_name;
-
+
// Define the allowed properties in the hash table.
ACE_TRY
{
@@ -1258,7 +1258,7 @@ TAO_PropertySetDef::define_property_with_mode (const char *property_name,
// Is this property allowed?
if (is_property_allowed (property_name) != 1)
ACE_THROW (CosPropertyService::UnsupportedProperty());
-
+
// Is this a valid mode.
if (property_mode == CosPropertyService::undefined)
ACE_THROW (CosPropertyService::UnsupportedMode());
@@ -1269,7 +1269,7 @@ TAO_PropertySetDef::define_property_with_mode (const char *property_name,
property_mode);
COSPROPERTY_HASH_ENTRY *entry_ptr;
-
+
int ret = this->hash_table_.bind (hash_key, hash_value, entry_ptr);
//CosProperty_Hash_Value old_value;
@@ -1281,11 +1281,11 @@ TAO_PropertySetDef::define_property_with_mode (const char *property_name,
break;
case 1:
// Property name exists.
-
+
// Is the pointer valid.
if (entry_ptr == 0)
ACE_THROW (CORBA::UNKNOWN ());
-
+
// If type is not the same, raise exception.
if (entry_ptr->int_id_.pvalue_.type () != property_value.type ())
ACE_THROW (CosPropertyService::ConflictingProperty());
@@ -1301,7 +1301,7 @@ TAO_PropertySetDef::define_property_with_mode (const char *property_name,
CosPropertyService::fixed_normal) &&
(property_mode < CosPropertyService::fixed_normal))
ACE_THROW (CosPropertyService::UnsupportedMode());
-
+
// Everything is fine. Overwrite the value.
if (this->hash_table_.rebind (hash_key,
hash_value) > 0)
@@ -1422,7 +1422,7 @@ TAO_PropertySetDef::get_property_mode (const char *property_name,
if (property_name == 0)
ACE_THROW_RETURN (CosPropertyService::InvalidPropertyName(),
CosPropertyService::undefined);
-
+
// Find the property in the hash table.
CosProperty_Hash_Key hash_key (property_name);
CosProperty_Hash_Value hash_value;
@@ -1530,7 +1530,7 @@ TAO_PropertySetDef::set_property_mode (const char *property_name,
CosProperty_Hash_Value hash_value;
int ret = this->hash_table_.find (hash_key, hash_value);
-
+
//CosProperty_Hash_Value old_value;
//CosProperty_Hash_Key old_key;
@@ -1555,7 +1555,7 @@ TAO_PropertySetDef::set_property_mode (const char *property_name,
// Return values 0 and -1 are not possible.
ACE_THROW (CORBA::UNKNOWN ());
break;
-
+
case CosPropertyService::read_only:
// Read_only to fixed read only alone is possible.
if (property_mode != CosPropertyService::fixed_readonly)
@@ -1733,7 +1733,7 @@ TAO_PropertyNamesIterator::next_n (CORBA::ULong how_many,
return 0;
size_t size = this->iterator_.map ().current_size ();
-
+
size_t len = 0;
if (how_many <= size)
len = how_many;
@@ -1758,7 +1758,7 @@ TAO_PropertyNamesIterator::destroy (CORBA::Environment &ACE_TRY_ENV)
// Remove self from POA. Because of reference counting, the POA
// will automatically delete the servant when all pending requests
// on this servant are complete.
-
+
PortableServer::POA_var poa = this->_default_POA (ACE_TRY_ENV);
ACE_CHECK;
@@ -1795,7 +1795,7 @@ TAO_PropertiesIterator::next_one (CosPropertyService::Property_out aproperty,
ACE_THROW_SPEC ((CORBA::SystemException))
{
COSPROPERTY_HASH_ENTRY *entry_ptr;
-
+
if (this->iterator_.next (entry_ptr) != 0)
{
aproperty = new CosPropertyService::Property;
@@ -1850,7 +1850,7 @@ TAO_PropertiesIterator::next_n (CORBA::ULong how_many,
else
break;
}
-
+
return 1;
}
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
index eba2d98f969..b96a8c22021 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.cpp
@@ -251,7 +251,7 @@ TAO_Offer_Database<LOCK_TYPE>::retrieve_all_offer_ids (void)
! type_iter.done ();
type_iter++)
{
- const char* type_name = (*type_iter).ext_id_;
+ const char* type_name = (*type_iter).ext_id_.in ();
Offer_Map_Entry* offer_map_entry = (*type_iter).int_id_;
ACE_READ_GUARD_RETURN (LOCK_TYPE, ace_mon, offer_map_entry->lock_, 0);
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp
index 04bf9dce0d5..19de411621e 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.cpp
@@ -211,7 +211,7 @@ list_types (const CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes
itr++)
{
Type_Info* type_info = (*itr).int_id_;
- const char* type_name = (const char*) (*itr).ext_id_;
+ const char* type_name = (*itr).ext_id_.in ();
if (all
|| num < type_info->type_struct_.incarnation)
diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp
index 18b1cce247c..9562d55d0af 100644
--- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp
+++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.cpp
@@ -138,7 +138,7 @@ TAO_Policy_Creator::fetch_next_policy (TAO_Policies::POLICY_TYPE pol_type)
index = this->num_policies_ - 1;
// Ensure the starting trader policy gets the first slot.
- if (pol_type != TAO_Policies::STARTING_TRADER
+ if (pol_type != TAO_Policies::STARTING_TRADER
|| index == 0)
{
this->policies_[index].name = TAO_Policies::POLICY_NAMES[pol_type];
@@ -864,15 +864,15 @@ copy_in_follow_option (CosTrading::PolicySeq& policy_seq,
follow_option = link_info.limiting_follow_rule < trader_max_follow_policy
? (link_info.limiting_follow_rule < query_link_follow_rule
- ? link_info.limiting_follow_rule
- : query_link_follow_rule)
+ ? link_info.limiting_follow_rule
+ : query_link_follow_rule)
: (trader_max_follow_policy < query_link_follow_rule
- ? trader_max_follow_policy
+ ? trader_max_follow_policy
: query_link_follow_rule);
}
else
follow_option = link_info.def_pass_on_follow_rule < trader_max_follow_policy
- ? link_info.def_pass_on_follow_rule
+ ? link_info.def_pass_on_follow_rule
: trader_max_follow_policy;
CORBA::ULong i = 0;
@@ -1377,7 +1377,7 @@ TAO_Offer_Filter::limits_applied (void)
{
TAO_String_Hash_Key* policy_name_ptr = 0;
p_iter.next (policy_name_ptr);
- temp[i++] = CORBA::string_dup ((const char*) *policy_name_ptr);
+ temp[i++] = CORBA::string_dup (policy_name_ptr->in ());
}
return new CosTrading::PolicyNameSeq (size, size, temp, 1);
diff --git a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
index 12562118f7e..30cc7a8c8bd 100644
--- a/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
+++ b/TAO/orbsvcs/tests/Event/Basic/BCast.cpp
@@ -19,7 +19,8 @@ main (int argc, char *argv [])
// ****************************************************************
EC_BCast::EC_BCast (void)
- : bcast_port_ (12345)
+ : bcast_address_ ("255.255.255.255"),
+ bcast_port_ (12345)
{
}
@@ -41,6 +42,12 @@ EC_BCast::parse_args (int& argc, char* argv[])
this->bcast_port_ = ACE_OS::atoi (arg_shifter.get_current ());
}
+ else if (ACE_OS::strcmp (arg, "-address") == 0)
+ {
+ arg_shifter.consume_arg ();
+ this->bcast_address_ = arg_shifter.get_current ();
+ }
+
arg_shifter.ignore_arg ();
}
@@ -70,7 +77,7 @@ EC_BCast::execute_test (CORBA::Environment& ACE_TRY_ENV)
TAO_ECG_UDP_Sender sender;
TAO_ECG_UDP_Out_Endpoint endpoint;
- ACE_INET_Addr udp_addr (this->bcast_port_, "128.252.165.255");
+ ACE_INET_Addr udp_addr (this->bcast_port_, this->bcast_address_);
Simple_Address_Server address_server_impl (udp_addr);
RtecUDPAdmin::AddrServer_var address_server =
diff --git a/TAO/orbsvcs/tests/Event/Basic/BCast.h b/TAO/orbsvcs/tests/Event/Basic/BCast.h
index ecb93ad3da7..5eafe822a3b 100644
--- a/TAO/orbsvcs/tests/Event/Basic/BCast.h
+++ b/TAO/orbsvcs/tests/Event/Basic/BCast.h
@@ -52,6 +52,9 @@ public:
// Don't dump the EC_Driver results, they are meaningless.
private:
+ const char* bcast_address_;
+ // The IP address used to broadcast
+
u_short bcast_port_;
// The port used to send and receive bcast messages...
};
diff --git a/TAO/performance-tests/Thruput/TAO/utils.cpp b/TAO/performance-tests/Thruput/TAO/utils.cpp
index ceec3f5a52c..bcb14d025fd 100644
--- a/TAO/performance-tests/Thruput/TAO/utils.cpp
+++ b/TAO/performance-tests/Thruput/TAO/utils.cpp
@@ -268,7 +268,7 @@ void PrintStats (void)
break;
}
outFile = fopen (filename, "a+");
- ACE_OS::fprintf (outFile, "%ldk \t", buflen / 1024);
+ ACE_OS::fprintf (outFile, "%dk \t", buflen / 1024);
tmp = ((double) nbytes) / realt;
ACE_OS::fprintf (outFile, "%.2f\n", tmp * 8.0 / 1024.0 / 1024.0);
fclose (outFile);
@@ -286,7 +286,7 @@ void PrintStats (void)
nbytes, cput, outfmt (((double) nbytes) / cput));
}
ACE_OS::fprintf (stdout,
- "ttcp%s: %d Server Method calls, msec/call = %.2f, calls/sec = %.2f\n",
+ "ttcp%s: %ld Server Method calls, msec/call = %.2f, calls/sec = %.2f\n",
trans ? "-t" : "-r",
numCalls,
1024.0 * realt / ((double) numCalls),
@@ -490,32 +490,33 @@ prusage (char *outp)
break;
case 'M':
- ACE_OS::sprintf (outp, "%d", rusage.ru_maxrss / 2);
+ ACE_OS::sprintf (outp, "%ld", rusage.ru_maxrss / 2);
END (outp);
break;
case 'F':
- ACE_OS::sprintf (outp, "%d", rusage.ru_majflt);
+ ACE_OS::sprintf (outp, "%ld", rusage.ru_majflt);
END (outp);
break;
case 'R':
- ACE_OS::sprintf (outp, "%d", rusage.ru_minflt);
+ ACE_OS::sprintf (outp, "%ld", rusage.ru_minflt);
END (outp);
break;
case 'I':
- ACE_OS::sprintf (outp, "%d", rusage.ru_inblock);
+ ACE_OS::sprintf (outp, "%ld", rusage.ru_inblock);
END (outp);
break;
case 'O':
- ACE_OS::sprintf (outp, "%d", rusage.ru_oublock);
+ ACE_OS::sprintf (outp, "%ld", rusage.ru_oublock);
END (outp);
break;
case 'C':
- ACE_OS::sprintf (outp, "%d+%d", rusage.ru_nvcsw, rusage.ru_nivcsw);
+ ACE_OS::sprintf (outp, "%ld+%ld",
+ rusage.ru_nvcsw, rusage.ru_nivcsw);
END (outp);
break;
# endif /*ACE HAS PRUSAGE_T | ACE_HAS_GETRUSAGE*/
diff --git a/TAO/utils/nslist/nslist.cpp b/TAO/utils/nslist/nslist.cpp
index 5c910a23ece..caf75c54bbf 100644
--- a/TAO/utils/nslist/nslist.cpp
+++ b/TAO/utils/nslist/nslist.cpp
@@ -58,7 +58,7 @@ show_chunk (CosNaming::NamingContext_ptr nc,
CORBA::Object_var obj = nc->resolve (Name);
CosNaming::NamingContext_var xc =
- CosNaming::NamingContext::_narrow (obj);
+ CosNaming::NamingContext::_narrow (obj.in ());
list_context (xc, level + 1);
}
// Mark this node as a reference
@@ -110,7 +110,7 @@ main (int argc, char *argv[])
ACE_TRY_CHECK;
CosNaming::NamingContext_var root_nc =
- CosNaming::NamingContext::_narrow (obj);
+ CosNaming::NamingContext::_narrow (obj.in ());
ACE_TRY_CHECK;
CORBA::String_var str =
@@ -118,7 +118,7 @@ main (int argc, char *argv[])
ACE_TRY_ENV);
ACE_TRY_CHECK;
- if (CORBA::is_nil (obj))
+ if (CORBA::is_nil (obj.in ()))
ACE_ERROR_RETURN ((LM_ERROR,
"Naming Service not found"),
-1);
@@ -127,7 +127,7 @@ main (int argc, char *argv[])
"Naming Service: <%s> ---------\n",
str.in ()));
- list_context (root_nc, 1);
+ list_context (root_nc.in (), 1);
}
ACE_CATCHANY
{