remove some Lock() and Unlock() from Plugin

This commit is contained in:
Tomasz Sowa 2021-04-11 12:09:42 +02:00
parent 634cf07d44
commit a8a9db53be
1 changed files with 0 additions and 8 deletions

View File

@ -199,9 +199,7 @@ bool Plugin::SetDependency(PluginInfo & info)
if( !res )
{
Lock();
log << log1 << "Plugin: cannot call a function - some of the winix pointers are null" << logend;
Unlock();
}
info.db = db;
@ -382,9 +380,7 @@ void Plugin::Call(Session * ses, int message, Slots::iterator & slot, PluginInfo
{
if( config->log_plugin_call )
{
Lock();
log << log1 << "Plugin: calling plugin id: " << slot->second.index << ", message: " << message << logend;
Unlock();
}
slot->second.is_running = true;
@ -399,20 +395,16 @@ void Plugin::Call(Session * ses, int message, Slots::iterator & slot, PluginInfo
if( config->log_plugin_call )
{
Lock();
log << log1 << "Plugin: returning from plugin id: " << slot->second.index << ", message: " << message
<< ", result: " << (info.res? "true" : "false") << logend;
Unlock();
}
}
else
{
Lock();
log << log1 << "Plugin: id: " << slot->second.index
<< ", message: " << message
<< ", recurrences are not allowed" << logend;
Unlock();
}
}