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
ec93e3e1
Commit
ec93e3e1
authored
Dec 25, 2011
by
Pavel Vainerman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Исправил ошибки в логе
parent
36bcf8dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
ORepHelpers.cc
src/ObjectRepository/ORepHelpers.cc
+20
-9
No files found.
src/ObjectRepository/ORepHelpers.cc
View file @
ec93e3e1
...
...
@@ -45,7 +45,8 @@ namespace ORepHelpers
CosNaming
::
NamingContext_ptr
getContext
(
const
string
&
cname
,
int
argc
,
const
char
*
const
*
argv
,
const
string
&
nsName
)
throw
(
ORepFailed
)
{
CORBA
::
ORB_var
orb
=
CORBA
::
ORB_init
(
argc
,
(
char
**
)
argv
);
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: orb init ok"
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
REPOSITORY
)
)
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: orb init ok"
<<
endl
;
return
getContext
(
orb
,
cname
,
nsName
);
}
// --------------------------------------------------------------------------
...
...
@@ -53,10 +54,13 @@ namespace ORepHelpers
{
CosNaming
::
NamingContext_var
rootC
;
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELPER(getContext): get rootcontext...(servname = "
<<
servname
<<
")"
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
REPOSITORY
)
)
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELPER(getContext): get rootcontext...(servname = "
<<
servname
<<
")"
<<
endl
;
rootC
=
getRootNamingContext
(
orb
,
servname
);
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELPER(getContext): get rootContect ok "
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
REPOSITORY
)
)
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELPER(getContext): get rootContect ok "
<<
endl
;
if
(
CORBA
::
is_nil
(
rootC
)
)
{
...
...
@@ -67,7 +71,9 @@ namespace ORepHelpers
if
(
cname
.
empty
()
)
return
rootC
.
_retn
();
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELPER(getContext): get ref context "
<<
cname
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
REPOSITORY
)
)
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELPER(getContext): get ref context "
<<
cname
<<
endl
;
CosNaming
::
Name_var
ctxName
=
omniURI
::
stringToName
(
cname
.
c_str
());
CosNaming
::
NamingContext_var
ctx
;
try
...
...
@@ -125,7 +131,8 @@ namespace ORepHelpers
throw
ORepFailed
(
err
.
str
());
}
unideb
[
Debug
::
REPOSITORY
]
<<
"getContext: получили "
<<
cname
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
REPOSITORY
)
)
unideb
[
Debug
::
REPOSITORY
]
<<
"getContext: получили "
<<
cname
<<
endl
;
// Если _var
// return CosNaming::NamingContext::_duplicate(ctx);
...
...
@@ -144,7 +151,9 @@ namespace ORepHelpers
{
// cout << "ORepHelpers(getRootNamingContext): nsName->" << nsName << endl;
CORBA
::
Object_var
initServ
=
orb
->
resolve_initial_references
(
nsName
.
c_str
());
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: get rootcontext...(nsName = "
<<
nsName
<<
")"
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
REPOSITORY
)
)
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: get rootcontext...(nsName = "
<<
nsName
<<
")"
<<
endl
;
rootContext
=
CosNaming
::
NamingContext
::
_narrow
(
initServ
);
if
(
CORBA
::
is_nil
(
rootContext
))
{
...
...
@@ -152,7 +161,8 @@ namespace ORepHelpers
throw
ORepFailed
(
err
.
c_str
());
}
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: init NameService ok"
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
REPOSITORY
)
)
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: init NameService ok"
<<
endl
;
}
catch
(
CORBA
::
ORB
::
InvalidName
&
ex
)
{
...
...
@@ -178,7 +188,8 @@ namespace ORepHelpers
throw
ORepFailed
(
err
);
}
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: gett root context ok"
<<
endl
;
if
(
unideb
.
debugging
(
Debug
::
REPOSITORY
)
)
unideb
[
Debug
::
REPOSITORY
]
<<
"OREPHELP: get root context ok"
<<
endl
;
// // Если создан как _ptr
// return rootContext;
...
...
@@ -261,7 +272,7 @@ namespace ORepHelpers
bad
+=
"', "
;
}
string
err
(
"Имя не должно со
ж
ержать символы: "
+
bad
);
string
err
(
"Имя не должно со
д
ержать символы: "
+
bad
);
return
err
;
}
// ---------------------------------------------------------------------------------------------------------------
...
...
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