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

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

parent b37744a3
...@@ -45,7 +45,8 @@ namespace ORepHelpers ...@@ -45,7 +45,8 @@ 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 );
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); return getContext(orb, cname, nsName);
} }
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
...@@ -53,10 +54,13 @@ namespace ORepHelpers ...@@ -53,10 +54,13 @@ namespace ORepHelpers
{ {
CosNaming::NamingContext_var rootC; 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); 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) ) 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();
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::Name_var ctxName = omniURI::stringToName(cname.c_str());
CosNaming::NamingContext_var ctx; CosNaming::NamingContext_var ctx;
try try
...@@ -125,7 +131,8 @@ namespace ORepHelpers ...@@ -125,7 +131,8 @@ namespace ORepHelpers
throw ORepFailed(err.str()); throw ORepFailed(err.str());
} }
unideb[Debug::REPOSITORY] << "getContext: получили "<< cname << endl; if( unideb.debugging(Debug::REPOSITORY) )
unideb[Debug::REPOSITORY] << "getContext: получили "<< cname << endl;
// Если _var // Если _var
// return CosNaming::NamingContext::_duplicate(ctx); // return CosNaming::NamingContext::_duplicate(ctx);
...@@ -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());
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); rootContext = CosNaming::NamingContext::_narrow(initServ);
if (CORBA::is_nil(rootContext)) if (CORBA::is_nil(rootContext))
{ {
...@@ -152,7 +161,8 @@ namespace ORepHelpers ...@@ -152,7 +161,8 @@ namespace ORepHelpers
throw ORepFailed(err.c_str()); 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) 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