mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 10:03:03 +01:00
Fixed bug CORE-4906 : AV when server is shutted down with active trace session(s)
This commit is contained in:
parent
363c0fae9b
commit
2291a41e8f
@ -83,7 +83,10 @@ const char* TracePluginImpl::marshal_exception(const Firebird::Exception& ex)
|
||||
return get_error_string();
|
||||
}
|
||||
|
||||
TracePluginImpl::TracePluginImpl(const TracePluginConfig& configuration, ITraceInitInfo* initInfo) :
|
||||
TracePluginImpl::TracePluginImpl(IPluginBase* plugin,
|
||||
const TracePluginConfig& configuration,
|
||||
ITraceInitInfo* initInfo) :
|
||||
factory(plugin),
|
||||
operational(false),
|
||||
session_id(initInfo->getTraceSessionID()),
|
||||
session_name(*getDefaultMemoryPool()),
|
||||
|
@ -134,11 +134,15 @@ public:
|
||||
typedef Firebird::BePlusTree<ServiceData, ServiceId, Firebird::MemoryPool, ServiceData>
|
||||
ServicesTree;
|
||||
|
||||
TracePluginImpl(const TracePluginConfig& configuration, Firebird::ITraceInitInfo* initInfo);
|
||||
TracePluginImpl(Firebird::IPluginBase* factory, const TracePluginConfig& configuration, Firebird::ITraceInitInfo* initInfo);
|
||||
|
||||
private:
|
||||
~TracePluginImpl();
|
||||
|
||||
// Used to not allow to destroy plugin factory and unload dll\so if
|
||||
// instance of TracePluginImpl class exists
|
||||
Firebird::RefPtr<Firebird::IPluginBase> factory;
|
||||
|
||||
bool operational; // Set if plugin is fully initialized and is ready for logging
|
||||
// Keep this member field first to ensure its correctness
|
||||
// when destructor is called
|
||||
|
@ -90,7 +90,7 @@ Firebird::ITracePlugin* TraceFactoryImpl::trace_create(Firebird::CheckStatusWrap
|
||||
if (logWriter)
|
||||
config.log_filename = "";
|
||||
|
||||
return new TracePluginImpl(config, initInfo); // Everything is ok, we created a plugin
|
||||
return new TracePluginImpl(this, config, initInfo); // Everything is ok, we created a plugin
|
||||
|
||||
}
|
||||
catch (Firebird::Exception& ex)
|
||||
|
Loading…
Reference in New Issue
Block a user