remove some Lock() and Unlock() from Plugin
This commit is contained in:
parent
634cf07d44
commit
a8a9db53be
|
@ -199,9 +199,7 @@ bool Plugin::SetDependency(PluginInfo & info)
|
||||||
|
|
||||||
if( !res )
|
if( !res )
|
||||||
{
|
{
|
||||||
Lock();
|
|
||||||
log << log1 << "Plugin: cannot call a function - some of the winix pointers are null" << logend;
|
log << log1 << "Plugin: cannot call a function - some of the winix pointers are null" << logend;
|
||||||
Unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
info.db = db;
|
info.db = db;
|
||||||
|
@ -382,9 +380,7 @@ void Plugin::Call(Session * ses, int message, Slots::iterator & slot, PluginInfo
|
||||||
{
|
{
|
||||||
if( config->log_plugin_call )
|
if( config->log_plugin_call )
|
||||||
{
|
{
|
||||||
Lock();
|
|
||||||
log << log1 << "Plugin: calling plugin id: " << slot->second.index << ", message: " << message << logend;
|
log << log1 << "Plugin: calling plugin id: " << slot->second.index << ", message: " << message << logend;
|
||||||
Unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
slot->second.is_running = true;
|
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 )
|
if( config->log_plugin_call )
|
||||||
{
|
{
|
||||||
Lock();
|
|
||||||
log << log1 << "Plugin: returning from plugin id: " << slot->second.index << ", message: " << message
|
log << log1 << "Plugin: returning from plugin id: " << slot->second.index << ", message: " << message
|
||||||
<< ", result: " << (info.res? "true" : "false") << logend;
|
<< ", result: " << (info.res? "true" : "false") << logend;
|
||||||
Unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Lock();
|
|
||||||
log << log1 << "Plugin: id: " << slot->second.index
|
log << log1 << "Plugin: id: " << slot->second.index
|
||||||
<< ", message: " << message
|
<< ", message: " << message
|
||||||
<< ", recurrences are not allowed" << logend;
|
<< ", recurrences are not allowed" << logend;
|
||||||
Unlock();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue