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 )
|
||||
{
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue