Commit 739c5e74 authored by Pavel Vainerman's avatar Pavel Vainerman

(Modbus): Исправил баг приводивший к deadlock-у обмена

parent b238fb11
......@@ -8,7 +8,7 @@
Name: libuniset
Version: 1.7
Release: alt3
Release: alt4
Summary: UniSet - library for building distributed industrial control systems
......@@ -335,6 +335,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
%exclude %_pkgconfigdir/libUniSet.pc
%changelog
* Thu Feb 06 2014 Pavel Vainerman <pv@altlinux.ru> 1.7-alt4
- ModbusExchange: fixed bug: deadlock for pollMutex..
* Tue Dec 10 2013 Pavel Vainerman <pv@altlinux.ru> 1.7-alt3
- add RRDServer
......
......@@ -2542,7 +2542,6 @@ void MBExchange::sysCommand( UniSetTypes::SystemMessage *sm )
if( !force )
{
uniset_mutex_lock l(pollMutex,2000);
force = true;
poll();
force = false;
......@@ -2736,7 +2735,7 @@ void MBExchange::poll()
}
{
uniset_mutex_lock l(pollMutex);
uniset_mutex_lock l(pollMutex,200);
pollActivated = true;
ptTimeout.reset();
}
......@@ -2818,7 +2817,7 @@ void MBExchange::poll()
}
{
uniset_mutex_lock l(pollMutex);
uniset_mutex_lock l(pollMutex,120);
pollActivated = false;
}
......@@ -2894,7 +2893,7 @@ void MBExchange::updateRespondSensors()
{
bool chanTimeout = false;
{
uniset_mutex_lock l(pollMutex);
uniset_mutex_lock l(pollMutex,240);
chanTimeout = pollActivated && ptTimeout.checkTime();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment