mirror of https://github.com/Icinga/icinga2.git
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.");
|
||||
|
||||
Application::RequestShutdown(EXIT_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
DiscardRows(result);
|
||||
|
@ -238,6 +239,7 @@ void IdoMysqlConnection::Reconnect(void)
|
|||
<< SCHEMA_VERSION << "'! Please check the upgrade documentation.";
|
||||
|
||||
Application::RequestShutdown(EXIT_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
String instanceName = GetInstanceName();
|
||||
|
|
|
@ -223,19 +223,27 @@ void IdoPgsqlConnection::Reconnect(void)
|
|||
Dictionary::Ptr row = FetchRow(result, 0);
|
||||
|
||||
if (!row) {
|
||||
PQfinish(m_Connection);
|
||||
m_Connection = NULL;
|
||||
|
||||
Log(LogCritical, "IdoPgsqlConnection", "Schema does not provide any valid version! Verify your schema installation.");
|
||||
|
||||
Application::RequestShutdown(EXIT_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
String version = row->Get("version");
|
||||
|
||||
if (Utility::CompareVersion(SCHEMA_VERSION, version) < 0) {
|
||||
PQfinish(m_Connection);
|
||||
m_Connection = NULL;
|
||||
|
||||
Log(LogCritical, "IdoPgsqlConnection")
|
||||
<< "Schema version '" << version << "' does not match the required version '"
|
||||
<< SCHEMA_VERSION << "'! Please check the upgrade documentation.";
|
||||
|
||||
Application::RequestShutdown(EXIT_FAILURE);
|
||||
return;
|
||||
}
|
||||
|
||||
String instanceName = GetInstanceName();
|
||||
|
|
Loading…
Reference in New Issue