summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelliott_c <ocielliottc@users.noreply.github.com>2007-04-03 16:13:57 +0000
committerelliott_c <ocielliottc@users.noreply.github.com>2007-04-03 16:13:57 +0000
commitd9d0968d26585bab67cafc519c278243f9e8d79f (patch)
treea683b13d930188b390e5c0f2c7cd040bb12a4d95
parent803304cdbc31f96d41c7bc79155039d3b2ebf90c (diff)
downloadATCD-d9d0968d26585bab67cafc519c278243f9e8d79f.tar.gz
ChangeLogTag: Tue Apr 3 16:10:10 UTC 2007 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--TAO/ChangeLog23
-rw-r--r--TAO/orbsvcs/orbsvcs/Notify/Notify_Constraint_Visitors.cpp16
-rw-r--r--TAO/orbsvcs/tests/Notify/Structured_Filter/Structured_Consumer.cpp5
-rw-r--r--TAO/orbsvcs/tests/Notify/Structured_Filter/notify.conf.xml6
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>