Commit 62468123 authored by Pavel Vainerman's avatar Pavel Vainerman

(Configuration): исправил ошибку в функции проверки доступности endPoint.

parent c318e1bc
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
Name: libuniset2 Name: libuniset2
Version: 2.6 Version: 2.6
Release: alt19 Release: alt20
Summary: UniSet - library for building distributed industrial control systems Summary: UniSet - library for building distributed industrial control systems
License: LGPL License: LGPL
...@@ -508,6 +508,9 @@ rm -f %buildroot%_libdir/*.la ...@@ -508,6 +508,9 @@ rm -f %buildroot%_libdir/*.la
# history of current unpublished changes # history of current unpublished changes
%changelog %changelog
* Sun May 28 2017 Pavel Vainerman <pv@altlinux.ru> 2.6-alt20
- (Configuration): fixed bug in check endPoint function
* Thu May 25 2017 Pavel Vainerman <pv@altlinux.ru> 2.6-alt19 * Thu May 25 2017 Pavel Vainerman <pv@altlinux.ru> 2.6-alt19
- MBSlave: Now does not terminate when socket is not open - MBSlave: Now does not terminate when socket is not open
- Configuration: Now does not terminate when endPoint is not available - Configuration: Now does not terminate when endPoint is not available
......
...@@ -55,4 +55,6 @@ int main(int argc, char **argv) ...@@ -55,4 +55,6 @@ int main(int argc, char **argv)
Для параметра 'endPoint' встроена дополнительная проверка доступности указанной адреса. Для параметра 'endPoint' встроена дополнительная проверка доступности указанной адреса.
\warning По умолчанию \b недоступность \b игнорируется, если не указан параметр \a error_if_not_available="1" \warning По умолчанию \b недоступность \b игнорируется, если не указан параметр \a error_if_not_available="1"
Помимо этого можно задать параметр \a ignore_checking="1", чтобы не происходило проверки доступности endPoint.
*/ */
\ No newline at end of file
...@@ -335,7 +335,7 @@ namespace uniset ...@@ -335,7 +335,7 @@ namespace uniset
if( p == "endPoint" ) if( p == "endPoint" )
{ {
const string param(omniIt.getProp("arg")); const string param(omniIt.getProp("arg"));
bool endPointIsAvailable = checkOmniORBendPoint(param); bool endPointIsAvailable = omniIt.getProp("ignore_checking").empty() ? checkOmniORBendPoint(param) : true;
// по умолчанию "недоступность" игнорируется // по умолчанию "недоступность" игнорируется
// но если указан параметр 'error_if_not_available' // но если указан параметр 'error_if_not_available'
...@@ -701,7 +701,7 @@ namespace uniset ...@@ -701,7 +701,7 @@ namespace uniset
bool ret = false; bool ret = false;
try try
{ {
bool ret = ep->Bind(); ret = ep->Bind();
if( ret ) if( ret )
ep->Shutdown(); ep->Shutdown();
} }
...@@ -711,6 +711,10 @@ namespace uniset ...@@ -711,6 +711,10 @@ namespace uniset
ret = false; ret = false;
} }
ulogsys << "(Configuration::checkOmniORBendPoint): check " << endPoint << " "
<< ( ret ? "OK" : "FAILED" )
<< endl;
return ret; return ret;
} }
// ------------------------------------------------------------------------- // -------------------------------------------------------------------------
......
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