From 78de1b7c23b2e1e3792b19253d9547d93e33cf11 Mon Sep 17 00:00:00 2001 From: prascle Date: Tue, 20 Sep 2005 19:19:37 +0000 Subject: [PATCH] PR: Trace collector instance when used in an external Python module --- src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx index e378550ad..fc6ee8201 100644 --- a/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx +++ b/src/LifeCycleCORBA/SALOME_LifeCycleCORBA.cxx @@ -38,6 +38,7 @@ #include #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; -- 2.39.2