Bug 3202

Summary: Incomplete return value from CosNotifyFilter::Filter::add_constraint()
Product: TAO Reporter: Wernke zur Borg <wernke.zur.borg>
Component: Notification ServiceAssignee: Wernke zur Borg <wernke.zur.borg>
Status: NEW ---    
Severity: major CC: jwillemsen
Priority: P2    
Version: 1.6.2   
Hardware: All   
OS: All   

Description Wernke zur Borg 2008-01-22 09:26:17 CST
The implementation of CosNotifyFilter::Filter::add_constraints() fails to set the value constraint_id in the return structure ConstraintInfoSeq. Therefore it is not possible to use get_constraints() and modify_constraints() on a filter, which both need valid constraint_ids.

This is in TAO/orbsvcs/orbsvcs/Notify/ETCL_Filter.cpp, function TAO_Notify_ETCL_Filter::add_constraints().

All tests in orbsvcs/tests/Notify never evaluate the return value of add_constraints() nor do they call get_constraints() or modify_constraints() on a filter, therefore the bug might have passed undetected by now.
Comment 1 Wernke zur Borg 2008-01-22 09:50:40 CST
A possible fix would be changing the argument of TAO_Notify_ETCL_Filter::add_constraints_i(const CosNotifyFilter::ConstraintInfoSeq&) to non-const and insert the constraint_id there, but I am not sure about the side-effects on modify_constraints().
Comment 2 Johnny Willemsen 2008-02-05 14:46:28 CST
please add a proposed patch as unified diff (diff -u)
Comment 3 Johnny Willemsen 2008-03-28 05:00:39 CDT
reassing to reporter, please provide a patch and an automated regression test