]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
Dft SSL : Logger case : WIP
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 24 Feb 2022 06:30:54 +0000 (07:30 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 24 Feb 2022 06:30:54 +0000 (07:30 +0100)
src/Logger/SALOME_Logger_Server_main.cxx
src/SALOMETraceCollector/CMakeLists.txt
src/SALOMETraceCollector/SALOMETraceCollector.cxx
src/Utils/Test/UtilsTest.cxx

index b2328f683739218ee95370b876ff300f5df911f5..a0b60b130290a2fe9d6eb6c1678b9f40f8d525b1 100644 (file)
@@ -32,6 +32,7 @@
 #include <SALOMEconfig.h>
 #include <sys/types.h>
 #include <stdlib.h>
+#include "KernelBasis.hxx"
 
 #ifndef WIN32
 # include <unistd.h>
@@ -61,7 +62,7 @@ int main(int argc, char **argv)
       CORBA::Object_var obj;
       PortableServer::POA_var poa;
       PortableServer::POAManager_var pman;   
-
+      setSSLMode(false);
       SetArgcArgv(argc, argv);
       CORBA::ORB_var orb = KERNEL::GetRefToORB() ;
 
index b6bfd678be1df85cc85406156a44020656403a98..d7cdeab3ec60da8fdce3575e9281fc57645b48a4 100644 (file)
@@ -27,13 +27,14 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
   ${CMAKE_CURRENT_SOURCE_DIR}/../Basics
   ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
+  ${CMAKE_CURRENT_SOURCE_DIR}/../Logger
   ${PROJECT_BINARY_DIR}/idl
 )
 
 ADD_DEFINITIONS(${OMNIORB_DEFINITIONS} ${PTHREAD_DEFINITIONS})
 ADD_LIBRARY(with_loggerTraceCollector SALOMETraceCollector.cxx TraceCollector_WaitForServerReadiness.cxx)
 
-TARGET_LINK_LIBRARIES(with_loggerTraceCollector SalomeNS ArgvKeeper SALOMELocalTrace OpUtil SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PTHREAD_LIBRARIES})
+TARGET_LINK_LIBRARIES(with_loggerTraceCollector SalomeNS ArgvKeeper SALOMELocalTrace SalomeLoggerServer OpUtil SalomeIDLKernel ${OMNIORB_LIBRARIES} ${PTHREAD_LIBRARIES})
 INSTALL(TARGETS with_loggerTraceCollector EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
 
 FILE(GLOB COMMON_HEADERS_HXX "${CMAKE_CURRENT_SOURCE_DIR}/*.hxx")
index 716cd598590a166bb9996a4f243dc474a558ff8d..82fdc3e67e9d56445eadec25868b6a2bf074f560 100644 (file)
@@ -209,11 +209,23 @@ SALOMETraceCollector::SALOMETraceCollector()
  */
 // ============================================================================
 
+#include "KernelBasis.hxx"
+#include "SALOME_Logger_Server.hxx"
+#include "SALOME_Fake_NamingService.hxx"
+
+#include <memory>
+
 extern "C"
 {
  SALOMETRACECOLLECTOR_EXPORT
   BaseTraceCollector *SingletonInstance(void)
   {
+    if(getSSLMode())
+    {
+      SALOME_Logger::Logger_var logger = KERNEL::getLoggerServantSA();
+      std::unique_ptr<SALOME_Fake_NamingService> ns(new SALOME_Fake_NamingService);
+      ns->Register(logger,"/Logger");
+    }
     BaseTraceCollector *instance = SALOMETraceCollector::instance();
     return instance;
   }
index 2f14c1c0783785a473ea4f87405b1ae4f12647c8..8a3d1dab2eb1ec78b1223fd1b0d6d493efa982ae 100644 (file)
@@ -30,6 +30,7 @@
 #include "Basics_Utils.hxx"
 #include "Basics_DirUtils.hxx"
 #include "utilities.h"
+#include "KernelBasis.hxx"
 
 #ifdef WIN32
 #define setenv Kernel_Utils::setenv
@@ -53,6 +54,7 @@ UtilsTest::_getTraceFileName()
 void
 UtilsTest::setUp()
 {
+  setSSLMode(false);
   LocalTraceBufferPool* bp1 = LocalTraceBufferPool::instance();
   CPPUNIT_ASSERT(bp1);
   bp1->deleteInstance(bp1);