Commit aabafa19 authored by Vitaly Lipatov's avatar Vitaly Lipatov

Configuration: add alternative value arg to getPort func

parent 70ae473f
......@@ -176,7 +176,7 @@ namespace UniSetTypes
void initParameters();
void setLocalNode( std::string nodename );
std::string getPort();
std::string getPort(const std::string port="");
friend class ::SystemGuard;
// friend bool SystemGuard::pingNode();
......
......@@ -869,21 +869,25 @@ void Configuration::setConfFileName( const string fn )
}
}
// -------------------------------------------------------------------------
string Configuration::getPort()
string Configuration::getPort(const string port)
{
// ?????? ????????? ??????
//
string defport(getArgParam("--uniset-port"));
if( !defport.empty() )
return defport;
// ????? ?????????? ?????????
//
if( getenv("UNISET_PORT") != NULL )
{
defport = getenv("UNISET_PORT");
return defport;
}
// ????? default
//
if( !port.empty() )
return port;
//
return UniSetDefaultPort;
}
// -------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment