Bug 3202 - Incomplete return value from CosNotifyFilter::Filter::add_constraint()
Summary: Incomplete return value from CosNotifyFilter::Filter::add_constraint()
Status: NEW
Alias: None
Product: TAO
Classification: Unclassified
Component: Notification Service (show other bugs)
Version: 1.6.2
Hardware: All All
: P2 major
Assignee: Wernke zur Borg
URL:
Depends on:
Blocks:
 
Reported: 2008-01-22 09:26 CST by Wernke zur Borg
Modified: 2008-03-28 05:00 CDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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