-// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
/* $Header$ */
#include <iostream>
+#include "ArgvKeeper.hxx"
#include "SALOME_NamingService.hxx"
#include "SALOME_ModuleCatalog_impl.hxx"
+#include "OpUtil.hxx"
#include "utilities.h"
#include "Utils_SINGLETON.hxx"
int main(int argc,char **argv)
{
// initialize the ORB
- CORBA::ORB_var orb = CORBA::ORB_init (argc, argv);
+ SetArgcArgv(argc, argv);
+ CORBA::ORB_var orb = KERNEL::GetRefToORB();
try
{
CosNaming::NamingContext_var _rootContext, catalogContext;
//
long TIMESleep = 500000000;
int NumberOfTries = 40;
-#ifndef WIN32
- int a;
-#endif
timespec ts_req;
ts_req.tv_nsec=TIMESleep;
ts_req.tv_sec=0;
{
if (i!=1)
#ifndef WIN32
- a=nanosleep(&ts_req,&ts_rem);
+ nanosleep(&ts_req,&ts_rem);
#else
Sleep(TIMESleep/1000000);
#endif
INFOS( "Module Catalog Server: Naming Service was found" );
if(EnvL==1)
{
- CORBA::ORB_var orb1 = CORBA::ORB_init(argc,argv) ;
+ CORBA::ORB_var orb1 = KERNEL::GetRefToORB() ;
SALOME_NamingService &NS = *SINGLETON_<SALOME_NamingService>::Instance() ;
NS.init_orb( orb1 ) ;
for(int j=1; j<=NumberOfTries; j++)
{
if (j!=1)
#ifndef WIN32
- a=nanosleep(&ts_req, &ts_rem);
+ nanosleep(&ts_req, &ts_rem);
#else
Sleep(TIMESleep/1000000);
#endif
try{
object = inc->resolve(name);}
- catch(CosNaming::NamingContext::NotFound)
+ catch(CosNaming::NamingContext::NotFound&)
{
INFOS( "Logger Server wasn't found" );
}
// initialise Naming Service
SALOME_NamingService _NS(orb);
// register Catalog in Naming Service
- _NS.Register(myCata ,"/Kernel/ModulCatalog");
+ _NS.Register(myCata ,SALOME_ModuleCatalogImpl::ENTRY_IN_NS);
MESSAGE("Running CatalogServer.");