{
if (serverName.length() == 0)
{
- char* dummyadr = NS->getIORaddr(); // to wait for naming service
+ CORBA::String_var dummyadr = NS->getIORaddr(); // to wait for naming service
found = 1;
- delete [] dummyadr;
break; // naming service found
}
else
}
MESSAGE("Server "<< serverName <<" not yet ready, waiting...");
#ifndef WNT
- int a = nanosleep(&ts_req,&ts_rem); // wait before retry
+ nanosleep(&ts_req,&ts_rem); // wait before retry
#else
- Sleep(TIMESleep/1000000);
+ Sleep(TIMESleep/1000000);
#endif
}
}
{
MESSAGE("CORBA::COMM_FAILURE: Naming Service not yet ready, waiting...");
#ifndef WNT
- int a = nanosleep(&ts_req,&ts_rem); // wait before retry
+ nanosleep(&ts_req,&ts_rem); // wait before retry
#else
- Sleep(TIMESleep/1000000);
+ Sleep(TIMESleep/1000000);
#endif
}
}
//CPPUNIT_ASSERT_THROW(NS.getIORaddr(),CORBA::Exception);
NS.init_orb(_orb);
- char *root = NS.getIORaddr();
+ CORBA::String_var root = NS.getIORaddr();
CORBA::Object_var obj = _orb->string_to_object(root);
- delete [] root;
CPPUNIT_ASSERT(!CORBA::is_nil(obj));
CosNaming::NamingContext_var rootContext =
NamingServiceTest::testConstructorOrb()
{
SALOME_NamingService NS(_orb);
- char *root = NS.getIORaddr();
+ CORBA::String_var root = NS.getIORaddr();
CORBA::Object_var obj = _orb->string_to_object(root);
CPPUNIT_ASSERT(!CORBA::is_nil(obj));
- delete [] root;
CosNaming::NamingContext_var rootContext =
CosNaming::NamingContext::_narrow(obj);
void
NamingServiceTest::testGetIorAddr()
{
- char *root = _NS.getIORaddr();
+ CORBA::String_var root = _NS.getIORaddr();
CORBA::Object_var obj = _orb->string_to_object(root);
- delete [] root;
CPPUNIT_ASSERT(!CORBA::is_nil(obj));
}