Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
a1fbe1d8
Commit
a1fbe1d8
authored
Sep 07, 2015
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ModbusTCPSession): исправил ошибку с "зависанием соединения"
(uniset-log): исправил ошибку с "загрузкой процессора" в случае закрытия "канала"
parent
ac610fd2
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
2 deletions
+16
-2
libuniset2.spec
conf/libuniset2.spec
+5
-1
ModbusTCPSession.cc
src/Communications/Modbus/ModbusTCPSession.cc
+8
-0
LogReader.cc
src/Log/LogReader.cc
+3
-1
No files found.
conf/libuniset2.spec
View file @
a1fbe1d8
...
...
@@ -13,7 +13,7 @@
Name: libuniset2
Version: 2.1
Release: alt2
2
Release: alt2
3
Summary: UniSet - library for building distributed industrial control systems
...
...
@@ -456,6 +456,10 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
# ..
%changelog
* Mon Sep 07 2015 Pavel Vainerman <pv@altlinux.ru> 2.1-alt23
- (ModbusPersistentSlave): fixed bug in end connection processing
- (uniset-log): fixed bug in end connection processing
* Sun Sep 06 2015 Pavel Vainerman <pv@altlinux.ru> 2.1-alt22
- refactoring (use shared_ptr), change pollfactor realisation..
...
...
src/Communications/Modbus/ModbusTCPSession.cc
View file @
a1fbe1d8
...
...
@@ -84,8 +84,16 @@ void ModbusTCPSession::run()
ModbusRTU
::
mbErrCode
res
=
erTimeOut
;
cancelled
=
false
;
char
pbuf
[
3
];
while
(
!
cancelled
&&
isPending
(
Socket
::
pendingInput
,
timeout
)
)
{
ssize_t
n
=
peek
(
pbuf
,
sizeof
(
pbuf
)
);
// кажется сервер закрыл канал
if
(
n
==
0
)
break
;
res
=
receive
(
addr
,
timeout
);
if
(
res
==
erSessionClosed
)
...
...
src/Log/LogReader.cc
View file @
a1fbe1d8
...
...
@@ -299,7 +299,7 @@ void LogReader::readlogs( const std::string& _addr, ost::tpport_t _port, LogServ
while
(
tcp
->
isPending
(
ost
::
Socket
::
pendingInput
,
inTimeout
)
)
{
in
t
n
=
tcp
->
peek
(
buf
,
sizeof
(
buf
)
-
1
);
ssize_
t
n
=
tcp
->
peek
(
buf
,
sizeof
(
buf
)
-
1
);
if
(
n
>
0
)
{
...
...
@@ -308,6 +308,8 @@ void LogReader::readlogs( const std::string& _addr, ost::tpport_t _port, LogServ
log
<<
buf
;
}
else
if
(
n
==
0
&&
readcount
<=
0
)
break
;
if
(
rcount
>
0
&&
readcount
>
0
)
rcount
--
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment