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 ...@@ -176,7 +176,7 @@ namespace UniSetTypes
void initParameters(); void initParameters();
void setLocalNode( std::string nodename ); void setLocalNode( std::string nodename );
std::string getPort(); std::string getPort(const std::string port="");
friend class ::SystemGuard; friend class ::SystemGuard;
// friend bool SystemGuard::pingNode(); // friend bool SystemGuard::pingNode();
......
...@@ -869,21 +869,25 @@ void Configuration::setConfFileName( const string fn ) ...@@ -869,21 +869,25 @@ void Configuration::setConfFileName( const string fn )
} }
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
string Configuration::getPort() string Configuration::getPort(const string port)
{ {
// ?????? ????????? ?????? //
string defport(getArgParam("--uniset-port")); string defport(getArgParam("--uniset-port"));
if( !defport.empty() ) if( !defport.empty() )
return defport; return defport;
// ????? ?????????? ????????? //
if( getenv("UNISET_PORT") != NULL ) if( getenv("UNISET_PORT") != NULL )
{ {
defport = getenv("UNISET_PORT"); defport = getenv("UNISET_PORT");
return defport; return defport;
} }
// ????? default //
if( !port.empty() )
return port;
//
return UniSetDefaultPort; 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