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
d2e0b4a1
Commit
d2e0b4a1
authored
Jun 03, 2009
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor optimization
parent
f7cf85eb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
19 deletions
+26
-19
UniversalInterface.cc
src/Interfaces/UniversalInterface.cc
+26
-19
No files found.
src/Interfaces/UniversalInterface.cc
View file @
d2e0b4a1
...
@@ -78,6 +78,7 @@ void UniversalInterface::init()
...
@@ -78,6 +78,7 @@ void UniversalInterface::init()
// NameSerivice
// NameSerivice
// . ޣ
// . ޣ
// localIOR
// localIOR
localctx
=
CosNaming
::
NamingContext
::
_nil
();
try
try
{
{
if
(
CORBA
::
is_nil
(
orb
)
)
if
(
CORBA
::
is_nil
(
orb
)
)
...
@@ -88,13 +89,20 @@ void UniversalInterface::init()
...
@@ -88,13 +89,20 @@ void UniversalInterface::init()
else
else
localctx
=
ORepHelpers
::
getRootNamingContext
(
orb
,
oind
->
getRealNodeName
(
uconf
->
getLocalNode
())
);
localctx
=
ORepHelpers
::
getRootNamingContext
(
orb
,
oind
->
getRealNodeName
(
uconf
->
getLocalNode
())
);
}
}
catch
(
Exception
&
ex
)
catch
(
Exception
&
ex
)
{
{
if
(
!
uconf
->
isLocalIOR
()
)
if
(
!
uconf
->
isLocalIOR
()
)
throw
ex
;
throw
ex
;
localctx
=
CosNaming
::
NamingContext
::
_nil
();
localctx
=
CosNaming
::
NamingContext
::
_nil
();
}
}
catch
(
...
)
{
if
(
!
uconf
->
isLocalIOR
()
)
throw
;
localctx
=
CosNaming
::
NamingContext
::
_nil
();
}
}
}
// ------------------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------------------
void
UniversalInterface
::
initBackId
(
UniSetTypes
::
ObjectId
backid
)
void
UniversalInterface
::
initBackId
(
UniSetTypes
::
ObjectId
backid
)
...
@@ -1563,27 +1571,22 @@ void UniversalInterface::registered( UniSetTypes::ObjectId id, UniSetTypes::Obje
...
@@ -1563,27 +1571,22 @@ void UniversalInterface::registered( UniSetTypes::ObjectId id, UniSetTypes::Obje
{
{
// ޣ
// ޣ
// IOR
// IOR
// ݣ
// NameService (omniNames)
if
(
uconf
->
isLocalIOR
()
)
if
(
uconf
->
isLocalIOR
()
)
{
{
if
(
CORBA
::
is_nil
(
orb
)
)
if
(
CORBA
::
is_nil
(
orb
)
)
orb
=
uconf
->
getORB
();
orb
=
uconf
->
getORB
();
string
sior
(
orb
->
object_to_string
(
oRef
));
uconf
->
iorfile
.
setIOR
(
id
,
node
,
orb
->
object_to_string
(
oRef
));
uconf
->
iorfile
.
setIOR
(
id
,
node
,
sior
);
return
;
return
;
}
}
try
try
{
{
string
nm
=
oind
->
getNameById
(
id
,
node
);
rep
.
registration
(
oind
->
getNameById
(
id
,
node
),
oRef
,(
bool
)
force
);
rep
.
registration
(
nm
,
oRef
,(
bool
)
force
);
}
}
catch
(
Exception
&
ex
)
catch
(
Exception
&
ex
)
{
{
if
(
!
uconf
->
isLocalIOR
()
)
throw
;
throw
;
}
}
}
}
...
@@ -1591,17 +1594,18 @@ void UniversalInterface::registered( UniSetTypes::ObjectId id, UniSetTypes::Obje
...
@@ -1591,17 +1594,18 @@ void UniversalInterface::registered( UniSetTypes::ObjectId id, UniSetTypes::Obje
void
UniversalInterface
::
unregister
(
UniSetTypes
::
ObjectId
id
,
UniSetTypes
::
ObjectId
node
)
throw
(
ORepFailed
)
void
UniversalInterface
::
unregister
(
UniSetTypes
::
ObjectId
id
,
UniSetTypes
::
ObjectId
node
)
throw
(
ORepFailed
)
{
{
if
(
uconf
->
isLocalIOR
()
)
if
(
uconf
->
isLocalIOR
()
)
{
uconf
->
iorfile
.
unlinkIOR
(
id
,
node
);
uconf
->
iorfile
.
unlinkIOR
(
id
,
node
);
return
;
}
try
try
{
{
string
nm
=
oind
->
getNameById
(
id
,
node
);
rep
.
unregistration
(
oind
->
getNameById
(
id
,
node
));
rep
.
unregistration
(
nm
);
}
}
catch
(
Exception
&
ex
)
catch
(
Exception
&
ex
)
{
{
if
(
!
uconf
->
isLocalIOR
()
)
throw
;
throw
;
}
}
}
}
...
@@ -1638,14 +1642,17 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
...
@@ -1638,14 +1642,17 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
{
{
// NameService ,
// NameService ,
//
//
if
(
CORBA
::
is_nil
(
localctx
)
)
// if( CORBA::is_nil(localctx) )
{
// {
unideb
[
Debug
::
WARN
]
<<
" IOR- "
<<
uconf
->
oind
->
getNameById
(
rid
,
node
)
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
WARN
)
)
{
unideb
[
Debug
::
WARN
]
<<
" IOR- "
<<
uconf
->
oind
->
getNameById
(
rid
,
node
)
<<
endl
;
}
throw
UniSetTypes
::
ResolveNameError
();
throw
UniSetTypes
::
ResolveNameError
();
}
//
}
// NameService (omniNames)
// NameService (omniNames)
unideb
[
Debug
::
WARN
]
<<
" IOR- "
<<
uconf
->
oind
->
getNameById
(
rid
,
node
)
//
unideb[Debug::WARN] << " IOR- " << uconf->oind->getNameById(rid,node)
<<
" NameService
\n
"
;
//
<< " NameService \n";
}
}
}
}
...
...
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