diff options
author | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-04-03 16:13:57 +0000 |
---|---|---|
committer | elliott_c <elliott_c@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2007-04-03 16:13:57 +0000 |
commit | a713c185cdf926c2db20121c60d3d19c6f82dd16 (patch) | |
tree | a683b13d930188b390e5c0f2c7cd040bb12a4d95 /TAO | |
parent | d49495907918bb33439e20b9c9af2398f7e606d6 (diff) | |
download | ATCD-a713c185cdf926c2db20121c60d3d19c6f82dd16.tar.gz |
ChangeLogTag: Tue Apr 3 16:10:10 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
Diffstat (limited to 'TAO')
-rw-r--r-- | TAO/ChangeLog | 23 | ||||
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp | 16 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp | 5 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf.xml | 6 |
4 files changed, 47 insertions, 3 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog index 9fe863da5c4..eecca780d59 100644 --- a/TAO/ChangeLog +++ b/TAO/ChangeLog @@ -1,3 +1,26 @@ +Tue Apr 3 16:10:10 UTC 2007 Chad Elliott <elliott_c@ociweb.com> + + * orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp: + + Fixed a couple of filtering issues: + + 1) If exist was used in the form of "exist $.filterable_data(ident)", + memory would be leaked in the form of a CORBA::string_dup(). + 2) If exist was used in the form of "exist ident", it would never + match anything. It now defaults to the looking at the + filterable data identifiers. + + This fixes bug 1263. + + * orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp: + + Modified this test to use both forms of exist in the filter. + + * orbsvcs/tests/Notify/Structured_Filter/notify.conf.xml: + + Converted notify.conf to XML for use with the XML service + configurator. + Tue Apr 3 13:05:52 UTC 2007 Chad Elliott <elliott_c@ociweb.com> * tests/Bug_2734_Regression/README: diff --git a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp index c0f9f4d3427..a4c31c34f80 100644 --- a/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp +++ b/TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp @@ -786,9 +786,21 @@ TAO_Notify_Constraint_Visitor::visit_exist (TAO_ETCL_Exist *exist) if (this->implicit_id_ == FILTERABLE_DATA || this->implicit_id_ == VARIABLE_HEADER) { - TAO_ETCL_Literal_Constraint current (&this->current_value_.inout ()); - value = CORBA::string_dup ((const char *) current); + this->current_value_ >>= value; } + // If the implicit id is empty, then we must default + // it to the filterable data and set up the value pointer + else if (this->implicit_id_ == EMPTY) + { + TAO_ETCL_Identifier* ident = + dynamic_cast<TAO_ETCL_Identifier*> (component); + if (ident != 0) + { + this->implicit_id_ = FILTERABLE_DATA; + value = ident->value (); + } + } + switch (this->implicit_id_) { diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp index cb54a45d762..a82b07f2dad 100644 --- a/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp @@ -104,7 +104,10 @@ int main (int argc, char * argv[]) constraint_list.length (1); constraint_list[0].event_types.length (0); - constraint_list[0].constraint_expr = CORBA::string_dup ("type != 1 and group != 0"); + constraint_list[0].constraint_expr = + CORBA::string_dup ("exist group and " + "exist $.filterable_data(type) and " + "type != 1 and group != 0"); filter->add_constraints (constraint_list); diff --git a/TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf.xml b/TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf.xml new file mode 100644 index 00000000000..2b31cbac10e --- /dev/null +++ b/TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf.xml @@ -0,0 +1,6 @@ +<?xml version='1.0'?> +<!-- Converted from notify.conf by svcconf-convert.pl --> +<ACE_Svc_Conf> + <!-- # $Id$ --> + <static id="Notify_Default_Event_Manager_Objects_Factory" params="-DispatchingThreads 1"/> +</ACE_Svc_Conf> |