Commit e032fd06 authored by Pavel Vainerman's avatar Pavel Vainerman

Убрал "вылет" при недоступности локального omniNames. Т.к. он нужен не всегда.

parent 0fea89d8
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Name: libuniset Name: libuniset
Version: 1.0 Version: 1.0
Release: alt44 Release: alt45
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: GPL License: GPL
Group: Development/C++ Group: Development/C++
...@@ -207,6 +207,9 @@ rm -f %buildroot%_libdir/*.la ...@@ -207,6 +207,9 @@ rm -f %buildroot%_libdir/*.la
%changelog %changelog
* Tue Oct 04 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt45
- dependence on mandatory disabled launching a local omninames service
* Mon Oct 03 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt44 * Mon Oct 03 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt44
- add nodes filter for UNet2 - add nodes filter for UNet2
- minor optimization - minor optimization
......
...@@ -89,15 +89,15 @@ void UniversalInterface::init() ...@@ -89,15 +89,15 @@ void UniversalInterface::init()
} }
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( ... ) catch( ... )
{ {
if( !uconf->isLocalIOR() ) // if( !uconf->isLocalIOR() )
throw; // throw;
localctx=CosNaming::NamingContext::_nil(); localctx=CosNaming::NamingContext::_nil();
} }
...@@ -1692,7 +1692,20 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout ...@@ -1692,7 +1692,20 @@ ObjectPtr UniversalInterface::resolve( ObjectId rid , ObjectId node, int timeout
} }
} }
else else
ctx = localctx; {
if( CORBA::is_nil(localctx) )
{
if( CORBA::is_nil(orb) )
{
CORBA::ORB_var _orb = uconf->getORB();
localctx = ORepHelpers::getRootNamingContext( _orb, oind->getRealNodeName(uconf->getLocalNode()) );
}
else
localctx = ORepHelpers::getRootNamingContext( orb, oind->getRealNodeName(uconf->getLocalNode()) );
}
else
ctx = localctx;
}
CosNaming::Name_var oname = omniURI::stringToName( oind->getNameById(rid,node).c_str() ); CosNaming::Name_var oname = omniURI::stringToName( oind->getNameById(rid,node).c_str() );
for (unsigned int i=0; i<uconf->getRepeatCount(); i++) for (unsigned int i=0; i<uconf->getRepeatCount(); i++)
......
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