mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 22:54:57 +02:00
Add missing "return"s in Ido*Connection::Reconnect
This commit is contained in:
parent
fd9dc32a3d
commit
bb4beefca9
@ -226,6 +226,7 @@ void IdoMysqlConnection::Reconnect(void)
|
|||||||
Log(LogCritical, "IdoMysqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
Log(LogCritical, "IdoMysqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
||||||
|
|
||||||
Application::RequestShutdown(EXIT_FAILURE);
|
Application::RequestShutdown(EXIT_FAILURE);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscardRows(result);
|
DiscardRows(result);
|
||||||
@ -238,6 +239,7 @@ void IdoMysqlConnection::Reconnect(void)
|
|||||||
<< SCHEMA_VERSION << "'! Please check the upgrade documentation.";
|
<< SCHEMA_VERSION << "'! Please check the upgrade documentation.";
|
||||||
|
|
||||||
Application::RequestShutdown(EXIT_FAILURE);
|
Application::RequestShutdown(EXIT_FAILURE);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String instanceName = GetInstanceName();
|
String instanceName = GetInstanceName();
|
||||||
|
@ -223,19 +223,27 @@ void IdoPgsqlConnection::Reconnect(void)
|
|||||||
Dictionary::Ptr row = FetchRow(result, 0);
|
Dictionary::Ptr row = FetchRow(result, 0);
|
||||||
|
|
||||||
if (!row) {
|
if (!row) {
|
||||||
|
PQfinish(m_Connection);
|
||||||
|
m_Connection = NULL;
|
||||||
|
|
||||||
Log(LogCritical, "IdoPgsqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
Log(LogCritical, "IdoPgsqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
||||||
|
|
||||||
Application::RequestShutdown(EXIT_FAILURE);
|
Application::RequestShutdown(EXIT_FAILURE);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String version = row->Get("version");
|
String version = row->Get("version");
|
||||||
|
|
||||||
if (Utility::CompareVersion(SCHEMA_VERSION, version) < 0) {
|
if (Utility::CompareVersion(SCHEMA_VERSION, version) < 0) {
|
||||||
|
PQfinish(m_Connection);
|
||||||
|
m_Connection = NULL;
|
||||||
|
|
||||||
Log(LogCritical, "IdoPgsqlConnection")
|
Log(LogCritical, "IdoPgsqlConnection")
|
||||||
<< "Schema version '" << version << "' does not match the required version '"
|
<< "Schema version '" << version << "' does not match the required version '"
|
||||||
<< SCHEMA_VERSION << "'! Please check the upgrade documentation.";
|
<< SCHEMA_VERSION << "'! Please check the upgrade documentation.";
|
||||||
|
|
||||||
Application::RequestShutdown(EXIT_FAILURE);
|
Application::RequestShutdown(EXIT_FAILURE);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
String instanceName = GetInstanceName();
|
String instanceName = GetInstanceName();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user