From 096d8a50821396b78553897dbea807f513663e88 Mon Sep 17 00:00:00 2001 From: srn Date: Mon, 11 Dec 2006 12:33:37 +0000 Subject: [PATCH] Fixed bug with retrieval of SALOMEDS_UNITTESTS_PORT variable --- src/SALOMEDS/Test/TestSALOMEDS.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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()); -- 2.39.2