eCAP APIs for HostTransaction::{virgin, cause, adapted} incorrect constness

Bug #1778594 reported by Mark
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eCAP
New
Undecided
Unassigned

Bug Description

In `src/libecap/host/xaction.h`, these methods are defined as non-const and their return types are also non-const, but they should be. Callers cannot rely on the host to know of changes to the structures (e.g., if adapter edits the Body) through this API. Therefore, they should be changed to return const references.

Current:
virtual Message &virgin();
virtual const Message &cause();
virtual Message &adapted();

Proposed:
virtual const Message &virgin() const;
virtual const Message &cause() const;
virtual const Message &adapted() const;

Initial testing suggests that sample adapters, clamAV sample, and Squid compile successfully with the above changes. This should probably be verified.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.