From: prascle Date: Tue, 20 Sep 2005 19:19:37 +0000 (+0000) Subject: PR: Trace collector instance when used in an external Python module X-Git-Tag: V302_lcrm_20051002~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=78de1b7c23b2e1e3792b19253d9547d93e33cf11;p=modules%2Fkernel.git PR: Trace collector instance when used in an external Python module --- 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;