Streamline ConfDb loading proceedure (#791)
* Create DatabaseConfBuilder & remove locking * Remove all refcounting This is part 1/n in regards to this PR's rework * Move db conf lookup out of RunThreadPart * Return default configuration for failed lookups * RefPtr members & stop leaks * fix uint comparison warning
This commit is contained in:
committed by
Kyle Sanderson
parent
53c63def07
commit
b9b6832a11
@@ -56,20 +56,14 @@ bool ClientPrefs::SDK_OnLoad(char *error, size_t maxlength, bool late)
|
||||
|
||||
if (DBInfo == NULL)
|
||||
{
|
||||
DBInfo = dbi->FindDatabaseConf("default");
|
||||
|
||||
DBInfo = dbi->FindDatabaseConf("storage-local");
|
||||
if (DBInfo == NULL)
|
||||
{
|
||||
DBInfo = dbi->FindDatabaseConf("storage-local");
|
||||
ke::SafeStrcpy(error, maxlength, "Could not find any suitable database configs");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (DBInfo == NULL)
|
||||
{
|
||||
ke::SafeStrcpy(error, maxlength, "Could not find any suitable database configs");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DBInfo->driver && DBInfo->driver[0] != '\0')
|
||||
{
|
||||
Driver = dbi->FindOrLoadDriver(DBInfo->driver);
|
||||
|
||||
Reference in New Issue
Block a user