Commit af5b4d79 authored by Pavel Vainerman's avatar Pavel Vainerman

Окончательно исправлена ошибка с вылетом в ping(),

при неинициализированном соединении.
parent cb621471
......@@ -3,7 +3,7 @@
Name: libuniset
Version: 1.0
Release: alt32
Release: alt33
Summary: UniSet - library for building distributed industrial control systems
License: GPL
Group: Development/C++
......@@ -207,6 +207,9 @@ rm -f %buildroot%_libdir/*.la
%changelog
* Thu May 19 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt33
- fixed bug in DBInterface::ping (again). Many thanks uzum
* Thu May 19 2011 Pavel Vainerman <pv@altlinux.ru> 1.0-alt32
- fixed bug in DBInterface::nextRow function
- fixed bug in DBInterface::ping
......
......@@ -219,10 +219,9 @@ bool DBInterface::moveToRow(int ind)
// -----------------------------------------------------------------------------------------
bool DBInterface::ping()
{
if(!mysql)
return false;
if(!connected)
if( !mysql || !connected )
return false;
// внимание mysql_ping возвращает 0
// если всё хорошо.... (поэтому мы инвертируем)
return !mysql_ping(mysql);
......
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