From: srn Date: Mon, 11 Dec 2006 12:33:37 +0000 (+0000) Subject: Fixed bug with retrieval of SALOMEDS_UNITTESTS_PORT variable X-Git-Tag: SALOMEDS_UnitTests_1_1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=096d8a50821396b78553897dbea807f513663e88;p=modules%2Fkernel.git Fixed bug with retrieval of SALOMEDS_UNITTESTS_PORT variable --- diff --git a/src/SALOMEDS/Test/TestSALOMEDS.cxx b/src/SALOMEDS/Test/TestSALOMEDS.cxx index 09a25a3ae..9ea70bac3 100644 --- a/src/SALOMEDS/Test/TestSALOMEDS.cxx +++ b/src/SALOMEDS/Test/TestSALOMEDS.cxx @@ -72,7 +72,9 @@ int main(int argc, char* argv[]) char hostname[511]; int size; gethostname(hostname, size); - string port = getenv("SALOMEDS_UNITTESTS_PORT"); + char* chr_port = getenv("SALOMEDS_UNITTESTS_PORT"); + string port; + if(chr_port) port = chr_port; if(port.empty()) port = "2810"; string cfg_file = string(getenv("HOME"))+"/.omniORB_"+string(hostname)+"_"+port+".cfg"; setenv("OMNIORB_CONFIG", cfg_file.c_str(), 1); @@ -91,7 +93,7 @@ int main(int argc, char* argv[]) system("killSalome.py"); return 1; } - + //Set up the environement for Embedded case string kernel_root = getenv("KERNEL_ROOT_DIR"); CPPUNIT_ASSERT(!kernel_root.empty());