Commit d52d7d65 authored by Pavel Vainerman's avatar Pavel Vainerman

Исправления по результатам наладки

parent 19b6eeac
......@@ -495,6 +495,15 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
* Sun Mar 20 2016 Pavel Vainerman <pv@etersoft.ru> 2.2-alt29.2
- rebuild
* Sat Mar 19 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.4
- test build
* Sat Mar 19 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.3
- test build
* Sat Mar 19 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.2
- test build
* Fri Mar 18 2016 Pavel Vainerman <pv@altlinux.ru> 2.2-alt28.1
- test build
......
......@@ -9,7 +9,7 @@ smemory_test_CPPFLAGS = -I$(top_builddir)/include \
$(SIGC_CFLAGS) $(COMCPP_CFLAGS)
smemory_test_SOURCES = TestProc_SK.cc TestProc.cc smemory-test.cc
BUILT_SOURCES=TestProc_SK.cc TestProc_SK.hh
BUILT_SOURCES=TestProc_SK.cc TestProc_SK.h
TestProc_SK.cc: testproc.src.xml
# ./uniset2-codegen --ask -n TestProc --local-include --topdir $(top_builddir)/ --no-main testproc.src.xml
......
......@@ -3,7 +3,7 @@
START=uniset2-start.sh
${START} -f ./smemory-test --confile ./test.xml --dlog-add-levels level1 --localNode LocalhostNode \
--sm-log-add-levels any $* --sm-run-logserver
--sm-log-add-levels any $* --sm-run-logserver --TestProc1-run-logserver
#--ulog-add-levels crit,warn,info
#system,level2,level8,level9
......@@ -98,7 +98,6 @@ class LogSession
ev::io io;
ev::timer cmdTimer;
ev::async asyncEvent;
std::mutex io_mutex;
FinalSlot slFin;
std::atomic_bool cancelled = { false };
......
......@@ -40,7 +40,7 @@ class ModbusServer
return dlog;
}
std::unordered_set<ModbusRTU::ModbusAddr> addr2vaddr( ModbusRTU::ModbusAddr& mbaddr );
static std::unordered_set<ModbusRTU::ModbusAddr> addr2vaddr( ModbusRTU::ModbusAddr& mbaddr );
/*! обработать очередное сообщение
\param vaddr - вектор адресов для которых принимать сообщения
......
......@@ -128,7 +128,6 @@ void LogSession::terminate()
cancelled = true;
{
std::unique_lock<std::mutex> lk2(io_mutex);
io.stop();
cmdTimer.stop();
asyncEvent.stop();
......@@ -156,8 +155,6 @@ void LogSession::event( ev::async& watcher, int revents )
return;
}
//writeEvent(io);
std::unique_lock<std::mutex> lk(io_mutex);
io.set(ev::READ | ev::WRITE);
}
// ---------------------------------------------------------------------
......@@ -182,7 +179,6 @@ void LogSession::callback( ev::io& watcher, int revents )
if( mylog.is_info() )
mylog.info() << peername << ": stop session... disconnect.." << endl;
std::unique_lock<std::mutex> lk(io_mutex);
io.stop();
cmdTimer.stop();
{
......@@ -235,8 +231,6 @@ void LogSession::writeEvent( ev::io& watcher )
delete buffer;
}
std::unique_lock<std::mutex> lk1(io_mutex);
if( logbuf.empty() )
io.set(ev::READ);
else
......@@ -326,9 +320,7 @@ void LogSession::readEvent( ev::io& watcher )
#endif
std::unique_lock<std::mutex> lk(io_mutex);
cmdTimer.stop();
io.set(ev::WRITE);
asyncEvent.start();
}
// --------------------------------------------------------------------------------
......@@ -413,9 +405,11 @@ void LogSession::cmdProcessing( const string& cmdLogName, const LogServerTypes::
LogAgregator::printLogList(s, loglist);
s << "=====================" << endl << endl;
std::unique_lock<std::mutex> lk(logbuf_mutex);
logbuf.push(new UTCPCore::Buffer(s.str()));
std::unique_lock<std::mutex> lk1(io_mutex);
{
std::unique_lock<std::mutex> lk(logbuf_mutex);
logbuf.push(new UTCPCore::Buffer(s.str()));
}
io.set(ev::WRITE);
}
}
......@@ -438,7 +432,6 @@ void LogSession::connectFinalSession( FinalSlot sl )
// ---------------------------------------------------------------------
bool LogSession::isAcive()
{
std::unique_lock<std::mutex> lk(io_mutex);
return io.is_active();
}
// ---------------------------------------------------------------------
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