Commit 80cb592f authored by Pavel Vainerman's avatar Pavel Vainerman

Исправил ошибки в логе

parent b37744a3
...@@ -45,6 +45,7 @@ namespace ORepHelpers ...@@ -45,6 +45,7 @@ namespace ORepHelpers
CosNaming::NamingContext_ptr getContext(const string& cname, int argc, const char* const* argv, const string& nsName )throw(ORepFailed) 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 ); CORBA::ORB_var orb = CORBA::ORB_init( argc, (char**)argv );
if( unideb.debugging(Debug::REPOSITORY) )
unideb[Debug::REPOSITORY] << "OREPHELP: orb init ok"<< endl; unideb[Debug::REPOSITORY] << "OREPHELP: orb init ok"<< endl;
return getContext(orb, cname, nsName); return getContext(orb, cname, nsName);
} }
...@@ -53,9 +54,12 @@ namespace ORepHelpers ...@@ -53,9 +54,12 @@ namespace ORepHelpers
{ {
CosNaming::NamingContext_var rootC; CosNaming::NamingContext_var rootC;
if( unideb.debugging(Debug::REPOSITORY) )
unideb[Debug::REPOSITORY] << "OREPHELPER(getContext): get rootcontext...(servname = "<< servname << ")" <<endl; unideb[Debug::REPOSITORY] << "OREPHELPER(getContext): get rootcontext...(servname = "<< servname << ")" <<endl;
rootC = getRootNamingContext(orb, servname); rootC = getRootNamingContext(orb, servname);
if( unideb.debugging(Debug::REPOSITORY) )
unideb[Debug::REPOSITORY] << "OREPHELPER(getContext): get rootContect ok " << endl; unideb[Debug::REPOSITORY] << "OREPHELPER(getContext): get rootContect ok " << endl;
if( CORBA::is_nil(rootC) ) if( CORBA::is_nil(rootC) )
...@@ -67,7 +71,9 @@ namespace ORepHelpers ...@@ -67,7 +71,9 @@ namespace ORepHelpers
if ( cname.empty() ) if ( cname.empty() )
return rootC._retn(); return rootC._retn();
if( unideb.debugging(Debug::REPOSITORY) )
unideb[Debug::REPOSITORY] << "OREPHELPER(getContext): get ref context " << cname << endl; unideb[Debug::REPOSITORY] << "OREPHELPER(getContext): get ref context " << cname << endl;
CosNaming::Name_var ctxName = omniURI::stringToName(cname.c_str()); CosNaming::Name_var ctxName = omniURI::stringToName(cname.c_str());
CosNaming::NamingContext_var ctx; CosNaming::NamingContext_var ctx;
try try
...@@ -125,6 +131,7 @@ namespace ORepHelpers ...@@ -125,6 +131,7 @@ namespace ORepHelpers
throw ORepFailed(err.str()); throw ORepFailed(err.str());
} }
if( unideb.debugging(Debug::REPOSITORY) )
unideb[Debug::REPOSITORY] << "getContext: получили "<< cname << endl; unideb[Debug::REPOSITORY] << "getContext: получили "<< cname << endl;
// Если _var // Если _var
...@@ -144,7 +151,9 @@ namespace ORepHelpers ...@@ -144,7 +151,9 @@ namespace ORepHelpers
{ {
// cout << "ORepHelpers(getRootNamingContext): nsName->" << nsName << endl; // cout << "ORepHelpers(getRootNamingContext): nsName->" << nsName << endl;
CORBA::Object_var initServ = orb->resolve_initial_references(nsName.c_str()); CORBA::Object_var initServ = orb->resolve_initial_references(nsName.c_str());
if( unideb.debugging(Debug::REPOSITORY) )
unideb[Debug::REPOSITORY] << "OREPHELP: get rootcontext...(nsName = "<< nsName << ")" <<endl; unideb[Debug::REPOSITORY] << "OREPHELP: get rootcontext...(nsName = "<< nsName << ")" <<endl;
rootContext = CosNaming::NamingContext::_narrow(initServ); rootContext = CosNaming::NamingContext::_narrow(initServ);
if (CORBA::is_nil(rootContext)) if (CORBA::is_nil(rootContext))
{ {
...@@ -152,6 +161,7 @@ namespace ORepHelpers ...@@ -152,6 +161,7 @@ namespace ORepHelpers
throw ORepFailed(err.c_str()); throw ORepFailed(err.c_str());
} }
if( unideb.debugging(Debug::REPOSITORY) )
unideb[Debug::REPOSITORY] << "OREPHELP: init NameService ok"<< endl; unideb[Debug::REPOSITORY] << "OREPHELP: init NameService ok"<< endl;
} }
catch(CORBA::ORB::InvalidName& ex) catch(CORBA::ORB::InvalidName& ex)
...@@ -178,7 +188,8 @@ namespace ORepHelpers ...@@ -178,7 +188,8 @@ namespace ORepHelpers
throw ORepFailed(err); 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 // // Если создан как _ptr
// return rootContext; // return rootContext;
...@@ -261,7 +272,7 @@ namespace ORepHelpers ...@@ -261,7 +272,7 @@ namespace ORepHelpers
bad+="', "; bad+="', ";
} }
string err("Имя не должно сожержать символы: "+ bad); string err("Имя не должно содержать символы: "+ bad);
return err; return err;
} }
// --------------------------------------------------------------------------------------------------------------- // ---------------------------------------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment