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
7454a2de
Commit
7454a2de
authored
Dec 26, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Убрал лишние логи. Добавил принудительную инициализация CORBA-ссылок.
Исправил ошибку в указании имени.
parent
88d63c0f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
11 deletions
+25
-11
UniversalInterface.cc
src/Interfaces/UniversalInterface.cc
+2
-6
Configuration.cc
src/Various/Configuration.cc
+18
-1
ui.cc
tests/ui.cc
+3
-3
uitest.sh
tests/uitest.sh
+2
-1
No files found.
src/Interfaces/UniversalInterface.cc
View file @
7454a2de
...
...
@@ -1707,7 +1707,7 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
// {
if
(
unideb
.
debugging
(
Debug
::
WARN
)
)
{
unideb
[
Debug
::
WARN
]
<<
"
не найден IOR-файл для
"
<<
uconf
->
oind
->
getNameById
(
rid
,
node
)
<<
endl
;
unideb
[
Debug
::
WARN
]
<<
"
not found IOR-file for
"
<<
uconf
->
oind
->
getNameById
(
rid
,
node
)
<<
endl
;
}
throw
UniSetTypes
::
ResolveNameError
();
// }
...
...
@@ -1720,7 +1720,6 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
if
(
node
!=
uconf
->
getLocalNode
()
)
{
cout
<<
"******** Resolve REMOTE NODE ***"
<<
endl
;
// Получаем доступ к NameService на данном узле
ostringstream
s
;
s
<<
uconf
<<
oind
->
getRealNodeName
(
node
);
...
...
@@ -1758,7 +1757,6 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
}
else
{
cout
<<
"******** Resolve LOCAL NODE ***"
<<
endl
;
if
(
CORBA
::
is_nil
(
localctx
)
)
{
ostringstream
s
;
...
...
@@ -1776,8 +1774,6 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
ctx
=
localctx
;
}
ctx
=
localctx
;
cout
<<
"***resolve oname="
<<
oind
->
getNameById
(
rid
,
node
).
c_str
()
<<
endl
;
CosNaming
::
Name_var
oname
=
omniURI
::
stringToName
(
oind
->
getNameById
(
rid
,
node
).
c_str
()
);
for
(
unsigned
int
i
=
0
;
i
<
uconf
->
getRepeatCount
();
i
++
)
{
...
...
@@ -1848,7 +1844,7 @@ void UniversalInterface::send( ObjectId name, TransportMessage& msg, ObjectId no
throw
(
IO_THROW_EXCEPTIONS
)
{
if
(
name
==
DefaultObjectId
)
throw
ORepFailed
(
"UI(send):
попытка обратиться к объекту с
id=UniSetTypes::DefaultObjectId"
);
throw
ORepFailed
(
"UI(send):
ERROR:
id=UniSetTypes::DefaultObjectId"
);
try
{
...
...
src/Various/Configuration.cc
View file @
7454a2de
...
...
@@ -29,6 +29,7 @@
#include <sstream>
#include <iomanip>
#include <string>
#include <omniORB4/internal/initRefs.h>
#include "Configuration.h"
#include "Exceptions.h"
...
...
@@ -335,13 +336,20 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
string
name
(
oind
->
getRealNodeName
(
it
->
id
));
ostringstream
param
;
param
<<
this
<<
name
<<
"=corbaname::"
<<
it
->
host
<<
":"
<<
it
->
port
;
param
<<
this
<<
name
;
name
=
param
.
str
();
param
<<
"=corbaname::"
<<
it
->
host
<<
":"
<<
it
->
port
;
new_argv
[
i
+
1
]
=
strdup
(
param
.
str
().
c_str
());
if
(
unideb
.
debugging
(
Debug
::
INFO
)
)
unideb
[
Debug
::
INFO
]
<<
"(Configuration): внесли параметр "
<<
param
.
str
()
<<
endl
;
i
+=
2
;
ostringstream
uri
;
uri
<<
"corbaname::"
<<
it
->
host
<<
":"
<<
it
->
port
;
if
(
!
omni
::
omniInitialReferences
::
setFromArgs
(
name
.
c_str
(),
uri
.
str
().
c_str
())
)
cerr
<<
"**********************!!!! FAILED ADD name="
<<
name
<<
" uri="
<<
uri
.
str
()
<<
endl
;
assert
(
i
<
_argc
);
}
...
...
@@ -369,6 +377,15 @@ void Configuration::initConfiguration( int argc, const char* const* argv )
new_argv
[
i
+
1
]
=
strdup
(
param
.
str
().
c_str
());
if
(
unideb
.
debugging
(
Debug
::
INFO
)
)
unideb
[
Debug
::
INFO
]
<<
"(Configuration): внесли параметр "
<<
param
.
str
()
<<
endl
;
{
ostringstream
ns_name
;
ns_name
<<
this
<<
"NameService"
;
ostringstream
uri
;
uri
<<
"corbaname::"
<<
getProp
(
nsnode
,
"host"
)
<<
":"
<<
defPort
;
if
(
!
omni
::
omniInitialReferences
::
setFromArgs
(
ns_name
.
str
().
c_str
(),
uri
.
str
().
c_str
())
)
cerr
<<
"**********************!!!! FAILED ADD name="
<<
ns_name
<<
" uri="
<<
uri
.
str
()
<<
endl
;
}
}
_argv
=
new_argv
;
...
...
tests/ui.cc
View file @
7454a2de
...
...
@@ -10,13 +10,13 @@ int main( int argc, const char **argv )
try
{
UniSetTypes
::
Configuration
*
myconf
=
new
UniSetTypes
::
Configuration
(
argc
,
argv
,
"test.xml"
);
// UniversalInterface* ui = new UniversalInterface(myconf);
//cout << "************************ myconf=" << myconf << " conf=" << UniSetTypes::conf << endl;
UniversalInterface
*
ui
=
new
UniversalInterface
(
myconf
);
UniSetTypes
::
Configuration
*
myconf2
=
new
UniSetTypes
::
Configuration
(
argc
,
argv
,
"conf21300.xml"
);
UniversalInterface
*
ui2
=
new
UniversalInterface
(
myconf2
);
cout
<<
"************************ "
<<
ui2
->
getValue
(
200033
)
<<
endl
;
cout
<<
"************************ conf1: "
<<
ui
->
getValue
(
1
)
<<
endl
;
cout
<<
"************************ conf2: "
<<
ui2
->
getValue
(
200033
)
<<
endl
;
#if 0
uniset_init(argc,argv,"test.xml");
...
...
tests/uitest.sh
View file @
7454a2de
...
...
@@ -4,5 +4,6 @@ SID=$1
[
-z
"
$SID
"
]
&&
SID
=
1
uniset-start.sh
-f
./ui
--confile
test.xml
--sid
$SID
--unideb-add-levels
any
-ORBtraceLevel
20
uniset-start.sh
-f
./ui
--confile
test.xml
--sid
$SID
--unideb-add-levels
any
# -ORBtraceLevel 20
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