Cleaned up Main initialization handling. This will need to be refactored into a builder class.

This commit is contained in:
emb
2015-01-01 13:29:23 -06:00
parent f83fc56c5f
commit 174ea4f4f9
5 changed files with 73 additions and 46 deletions

View File

@@ -58,14 +58,11 @@ bool CollectionDatabase::ResetDatabase()
retVal = false;
}
//CheckDatabase();
return retVal;
}
bool CollectionDatabase::CheckDatabase()
bool CollectionDatabase::Initialize()
{
bool retVal = true;
int rc;
char *error = NULL;
sqlite3 *handle = DBInstance->GetHandle();
@@ -101,10 +98,10 @@ bool CollectionDatabase::CheckDatabase()
ss << "Unable to create Configurations table. Error: " << error;
Logger::Write(Logger::ZONE_ERROR, "Database", ss.str());
retVal = false;
return false;
}
return retVal;
return true;
}