]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
PR: Trace collector instance when used in an external Python module
authorprascle <prascle>
Tue, 20 Sep 2005 19:19:37 +0000 (19:19 +0000)
committerprascle <prascle>
Tue, 20 Sep 2005 19:19:37 +0000 (19:19 +0000)
src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx

index e378550ad36ba31b05fdcf6be20042914eb623a6..fc6ee8201a7784bdca076b8882f598e5a107b8be 100644 (file)
@@ -38,6 +38,7 @@
 #include <ServiceUnreachable.hxx>
 
 #include "SALOME_LifeCycleCORBA.hxx"
+#include "SALOMETraceCollector.hxx"
 #ifndef WNT
 #include CORBA_CLIENT_HEADER(SALOME_ModuleCatalog)
 #else
@@ -66,12 +67,15 @@ IncompatibleComponent::IncompatibleComponent(const IncompatibleComponent &ex):
 
 SALOME_LifeCycleCORBA::SALOME_LifeCycleCORBA(SALOME_NamingService *ns)
 {
+  // be sure to have an instance of traceCollector, when used via SWIG
+  // in a Python module
+  int argc = 0;
+  char *xargv = "";
+  char **argv = &xargv;
+  CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
+  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
   if (!ns)
     {
-      int argc = 0;
-      char *xargv = "";
-      char **argv = &xargv;
-      CORBA::ORB_var orb = CORBA::ORB_init(argc, argv);
       _NS = new SALOME_NamingService(orb);
     }
   else _NS = ns;