From f6f34224768fb59011b5f794f68bb9f46c4b9082 Mon Sep 17 00:00:00 2001 From: parsons Date: Fri, 7 Feb 2003 20:13:34 +0000 Subject: ChangeLogTag: Fri Feb 7 14:04:59 2003 Jeff Parsons --- TAO/ChangeLog | 13 +++++ TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp | 68 +++++++++++++---------- 2 files changed, 53 insertions(+), 28 deletions(-) diff --git a/TAO/ChangeLog b/TAO/ChangeLog index efd767772e4..9ac63c29769 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,16 @@ +Fri Feb 7 14:04:59 2003 Jeff Parsons + + * orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp: + + Added a check, when iterating through inherited operations + and attributes, for the existence of an attribute or + operation subsection in each parent, before trying to + read the number of operations or attributes the parent + has. If an interface has no operations, the operations + ACE_Configuration subsection will not have been created, + likewise for attributes. Thanks to Matej Sekoranja + for pointing out the potential bug. + Thu Feb 6 16:47:02 2003 Mayur Deshpande * tests/AMH_Oneway diff --git a/TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp b/TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp index 84548eaa77a..791a05013ba 100644 --- a/TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp +++ b/TAO/orbsvcs/orbsvcs/IFRService/InterfaceDef_i.cpp @@ -1318,23 +1318,29 @@ TAO_InterfaceDef_i::inherited_attributes ( if (status == 0) { - this->repo_->config ()->open_section (base_key, - "attrs", - 0, - attrs_key); - - this->repo_->config ()->get_integer_value (attrs_key, - "count", - count); + status = + this->repo_->config ()->open_section (base_key, + "attrs", + 0, + attrs_key); - for (u_int j = 0; j < count; ++j) + if (status == 0) { - this->repo_->config ()->open_section (attrs_key, - this->int_to_string (j), - 0, - attr_key); + this->repo_->config ()->get_integer_value (attrs_key, + "count", + count); + + for (u_int j = 0; j < count; ++j) + { + this->repo_->config ()->open_section ( + attrs_key, + this->int_to_string (j), + 0, + attr_key + ); - key_queue.enqueue_tail (attr_key); + key_queue.enqueue_tail (attr_key); + } } } } @@ -1369,23 +1375,29 @@ TAO_InterfaceDef_i::inherited_operations ( if (status == 0) { - this->repo_->config ()->open_section (base_key, - "ops", - 0, - ops_key); - - this->repo_->config ()->get_integer_value (ops_key, - "count", - count); + status = + this->repo_->config ()->open_section (base_key, + "ops", + 0, + ops_key); - for (u_int j = 0; j < count; ++j) + if (status == 0) { - this->repo_->config ()->open_section (ops_key, - this->int_to_string (j), - 0, - op_key); + this->repo_->config ()->get_integer_value (ops_key, + "count", + count); + + for (u_int j = 0; j < count; ++j) + { + this->repo_->config ()->open_section ( + ops_key, + this->int_to_string (j), + 0, + op_key + ); - key_queue.enqueue_tail (op_key); + key_queue.enqueue_tail (op_key); + } } } } -- cgit v1.2.1