]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
MPV: fix for PAL11765: if variable SALOME_trace not found do not raise exception.
authormpv <mpv@opencascade.com>
Tue, 16 Jan 2007 09:19:48 +0000 (09:19 +0000)
committermpv <mpv@opencascade.com>
Tue, 16 Jan 2007 09:19:48 +0000 (09:19 +0000)
src/SALOMELocalTrace/LocalTraceBufferPool.cxx

index ffec729d530576dacffe4739641c80c6bd4b74ea..2c43e3030f3fe539c6f60efc2e0e7297c1f160c4 100644 (file)
@@ -1,4 +1,4 @@
-//  Copyright (C) 2004  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  copyright (C) 2004  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
 // 
 //  This library is free software; you can redistribute it and/or 
@@ -92,17 +92,9 @@ LocalTraceBufferPool* LocalTraceBufferPool::instance()
 
          // --- start a trace Collector
 
-         char* traceKind;
-         bool isNotDefined = false;
-         if ( getenv("SALOME_trace") )
-           traceKind = getenv("SALOME_trace");
-         else
-           isNotDefined = true; // mkr : 27.11.2006 : PAL13967 - Distributed supervision graphs - Problem with "SALOME_trace"
-         
-         assert(traceKind);
-         //cerr<<"SALOME_trace="<<traceKind<<endl;
-
-         if ( isNotDefined || strcmp(traceKind,"local")==0 )
+         char* traceKind = getenv("SALOME_trace");
+
+         if ( !traceKind || strcmp(traceKind,"local")==0 ) // mkr : 27.11.2006 : PAL13967 - Distributed supervision graphs - Problem with "SALOME_trace"
            {
              _myThreadTrace = LocalTraceCollector::instance();
            }