... to avoid wrong mgr:menu output and the impression of a reconfigure
memory leak.
The old code was comparing action object pointers, which could not work,
and was adding the same action on every reconfigure call for modules that
register with Cache Manager during [re]configuration.
We already have a working method for finding registered actions. Use it.
CacheManager::registerProfile(const Mgr::ActionProfile::Pointer &profile)
{
Must(profile != NULL);
- if (std::find(menu_.begin(), menu_.end(), profile) == menu_.end()) {
+ if (!CacheManager::findAction(profile->name)) {
menu_.push_back(profile);
debugs(16, 3, HERE << "registered profile: " << *profile);
} else {