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
e9a19faa
Commit
e9a19faa
authored
Oct 08, 2016
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Сделал перрывание программы (std::terminate) в случае критических ошибок,
и другие мелкие правки
parent
fea40455
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
7 deletions
+21
-7
log.cc
Utilities/ULog/log.cc
+1
-1
ctl-cpp-common.xsl
Utilities/codegen/ctl-cpp-common.xsl
+4
-3
start_fg.sh
Utilities/codegen/tests/start_fg.sh
+1
-1
LogReader.cc
src/Log/LogReader.cc
+2
-2
LogSession.cc
src/Log/LogSession.cc
+8
-0
UniSetManager.cc
src/ObjectRepository/UniSetManager.cc
+5
-0
No files found.
Utilities/ULog/log.cc
View file @
e9a19faa
...
...
@@ -87,7 +87,7 @@ int main( int argc, char** argv )
LogServerTypes
::
Command
cmd
=
LogServerTypes
::
cmdNOP
;
int
cmdonly
=
0
;
timeout_t
tout
=
UniSetTimer
::
WaitUpTime
;
timeout_t
rdelay
=
5
000
;
timeout_t
rdelay
=
8
000
;
string
logfile
(
""
);
bool
logtruncate
=
false
;
...
...
Utilities/codegen/ctl-cpp-common.xsl
View file @
e9a19faa
...
...
@@ -670,8 +670,8 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
mycrit
<<
err.str()
<<
endl;
// terminate();
// abort();
raise(SIGTERM);
terminate();
//
raise(SIGTERM);
std::
terminate();
// throw SystemError(err.str());
}
...
...
@@ -685,7 +685,8 @@ void <xsl:value-of select="$CLASSNAME"/>_SK::waitSM( int wait_msec, ObjectId _te
mycrit
<<
err.str()
<<
endl;
// terminate();
// abort();
raise(SIGTERM);
//raise(SIGTERM);
std::terminate();
// throw SystemError(err.str());
}
}
...
...
Utilities/codegen/tests/start_fg.sh
View file @
e9a19faa
...
...
@@ -2,7 +2,7 @@
ulimit
-Sc
1000000
uniset2-start.sh
-f
./test
--name
TestProc
--confile
test.xml
--ulog-add-levels
warn,crit
\
uniset2-start.sh
-f
./test
--name
TestProc
--confile
test.xml
--ulog-add-levels
system,
warn,crit
\
--test-sm-ready-timeout
15000
--test-run-logserver
--test-logserver-host
192.192.192.192
#--test-log-add-levels any $*
...
...
src/Log/LogReader.cc
View file @
e9a19faa
...
...
@@ -180,7 +180,7 @@ void LogReader::sendCommand(const std::string& _addr, int _port, std::vector<Com
msg
.
data
=
c
.
data
;
msg
.
setLogName
(
c
.
logfilter
);
unsigned
in
t
n
=
2
;
// две попытки на посылку
size_
t
n
=
2
;
// две попытки на посылку
while
(
n
>
0
)
{
...
...
@@ -244,7 +244,7 @@ void LogReader::sendCommand(const std::string& _addr, int _port, std::vector<Com
// теперь ждём ответ..
try
{
in
t
a
=
2
;
size_
t
a
=
2
;
while
(
a
>
0
&&
tcp
->
poll
(
UniSetTimer
::
millisecToPoco
(
reply_timeout
),
Poco
::
Net
::
Socket
::
SELECT_READ
)
)
{
...
...
src/Log/LogSession.cc
View file @
e9a19faa
...
...
@@ -137,6 +137,14 @@ void LogSession::logOnEvent( const std::string& s ) noexcept
if
(
logbuf
.
size
()
>=
maxRecordsNum
)
{
numLostMsg
++
;
if
(
numLostMsg
>
maxRecordsNum
)
{
// видимо клиент отвалился или совсем не успевает читать
// разрываем сессию..
if
(
mylog
.
is_info
()
)
mylog
.
info
()
<<
peername
<<
"(LogSession::onEvent): too many lost messages. Close session.."
<<
endl
;
cancelled
=
true
;
}
if
(
!
lostMsg
)
{
...
...
src/ObjectRepository/UniSetManager.cc
View file @
e9a19faa
...
...
@@ -343,6 +343,8 @@ void UniSetManager::objects(OManagerCommand cmd)
{
ucrit
<<
myname
<<
"(objects): "
<<
ex
<<
endl
;
ucrit
<<
myname
<<
"(objects): не смог зарегистрировать (разрегистрировать) объект -->"
<<
li
->
getName
()
<<
endl
;
if
(
cmd
==
activ
)
std
::
terminate
();
}
catch
(
const
CORBA
::
SystemException
&
ex
)
{
...
...
@@ -360,6 +362,9 @@ void UniSetManager::objects(OManagerCommand cmd)
ucrit
<<
myname
<<
"(objects): file: "
<<
fe
.
file
()
<<
" line: "
<<
fe
.
line
()
<<
" mesg: "
<<
fe
.
errmsg
()
<<
endl
;
if
(
cmd
==
activ
)
std
::
terminate
();
}
}
}
// unlock
...
...
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