void Inspector::rem_ref()
{ --ref_count[slot]; }
+void Inspector::add_global_ref()
+{ ++ref_count[0]; }
+
+void Inspector::rem_global_ref()
+{ --ref_count[0]; }
+
static const char* InspectorTypeNames[IT_MAX] =
{
"passive",
if ( handler )
{
handler->set_api(&p.api);
- handler->add_ref();
+ handler->add_global_ref();
if ( p.api.service )
handler->set_service(sc->proto_ref->add(p.api.service));
PHInstance::~PHInstance()
{
if ( handler )
- handler->rem_ref();
+ handler->rem_global_ref();
}
typedef vector<PHGlobal*> PHGlobalList;
{
FrameworkPolicy* fp = sc->policy_map->get_inspection_policy()->framework_policy;
for ( auto* p : fp->removed_ilist )
- p->handler->rem_ref();
+ p->handler->rem_global_ref();
fp->removed_ilist.clear();
}
if (!instance)
{
fp->removed_ilist.emplace_back(*it);
- (*it)->handler->add_ref();
+ (*it)->handler->add_global_ref();
(*it)->handler->tear_down(sc);
}
}
if ( !pi )
FatalError("unconfigured inspector: '%s'.\n", key);
else
- pi->add_ref();
+ pi->add_global_ref();
return pi;
}
void InspectorManager::release(Inspector* pi)
{
assert(pi);
- pi->rem_ref();
+ pi->rem_global_ref();
}
bool InspectorManager::configure(SnortConfig* sc, bool cloned)