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
cb081e64
Commit
cb081e64
authored
Nov 21, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(UNetUDP): исправление ошибки с переключением канала приёма
parent
30d0c144
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
3 deletions
+28
-3
libuniset2.spec
conf/libuniset2.spec
+4
-1
UNetExchange.cc
extensions/UNetUDP/UNetExchange.cc
+7
-0
UNetReceiver.cc
extensions/UNetUDP/UNetReceiver.cc
+16
-2
UNetReceiver.h
extensions/UNetUDP/UNetReceiver.h
+1
-0
No files found.
conf/libuniset2.spec
View file @
cb081e64
...
...
@@ -16,7 +16,7 @@
Name: libuniset2
Version: 2.6
Release: alt
1
Release: alt
2
Summary: UniSet - library for building distributed industrial control systems
License: LGPL
...
...
@@ -508,6 +508,9 @@ mv -f %buildroot%python_sitelibdir_noarch/* %buildroot%python_sitelibdir/%oname
# history of current unpublished changes
%changelog
* Mon Nov 21 2016 Pavel Vainerman <pv@altlinux.ru> 2.6-alt2
- UNet: fixed bug in change receive channel
* Fri Nov 11 2016 Pavel Vainerman <pv@altlinux.ru> 2.6-alt1
- build new version
- remove 'fastSaveValue'
...
...
extensions/UNetUDP/UNetExchange.cc
View file @
cb081e64
...
...
@@ -589,9 +589,16 @@ void UNetExchange::sysCommand( const uniset::SystemMessage* sm )
{
if
(
!
logserv_host
.
empty
()
&&
logserv_port
!=
0
&&
!
logserv
->
isRunning
()
)
{
try
{
unetinfo
<<
myname
<<
"(init): run log server "
<<
logserv_host
<<
":"
<<
logserv_port
<<
endl
;
logserv
->
run
(
logserv_host
,
logserv_port
,
true
);
}
catch
(
std
::
exception
&
ex
)
{
unetwarn
<<
myname
<<
"(init): run logserver FAILED. ERR: "
<<
ex
.
what
()
<<
endl
;
}
}
waitSMReady
();
...
...
extensions/UNetUDP/UNetReceiver.cc
View file @
cb081e64
...
...
@@ -479,6 +479,9 @@ void UNetReceiver::updateThread() noexcept
unetcrit
<<
myname
<<
"(update_thread): "
<<
ex
.
what
()
<<
endl
;
}
// смотрим есть ли связь..
checkConnection
();
if
(
sidRespond
!=
DefaultObjectId
)
{
try
...
...
@@ -525,8 +528,6 @@ void UNetReceiver::readEvent( ev::io& watcher ) noexcept
if
(
!
activated
)
return
;
bool
tout
=
false
;
try
{
if
(
receive
()
)
...
...
@@ -543,6 +544,11 @@ void UNetReceiver::readEvent( ev::io& watcher ) noexcept
{
unetwarn
<<
myname
<<
"(receive): "
<<
e
.
what
()
<<
std
::
endl
;
}
}
// -----------------------------------------------------------------------------
void
UNetReceiver
::
checkConnection
()
{
bool
tout
=
false
;
// делаем через промежуточную переменную
// чтобы поскорее освободить mutex
...
...
@@ -590,6 +596,9 @@ void UNetReceiver::updateEvent( ev::periodic& tm, int revents ) noexcept
unetcrit
<<
myname
<<
"(updateEvent): "
<<
ex
.
what
()
<<
std
::
endl
;
}
// смотрим есть ли связь..
checkConnection
();
if
(
sidRespond
!=
DefaultObjectId
)
{
try
...
...
@@ -676,6 +685,11 @@ bool UNetReceiver::receive() noexcept
unetcrit
<<
myname
<<
"(receive): recv err: "
<<
ex
.
displayText
()
<<
endl
;
return
false
;
}
catch
(
exception
&
ex
)
{
unetcrit
<<
myname
<<
"(receive): recv err: "
<<
ex
.
what
()
<<
endl
;
return
false
;
}
if
(
pack
.
magic
!=
UniSetUDP
::
UNETUDP_MAGICNUM
)
{
...
...
extensions/UNetUDP/UNetReceiver.h
View file @
cb081e64
...
...
@@ -224,6 +224,7 @@ class UNetReceiver:
void
initIterators
()
noexcept
;
bool
createConnection
(
bool
throwEx
=
false
);
void
checkConnection
();
public
:
...
...
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