== string.Empty is .Lenght == 0

This commit is contained in:
UbitUmarov
2022-01-13 20:31:52 +00:00
parent 6595e3ae26
commit fbbcc1edd7
149 changed files with 261 additions and 264 deletions

View File

@@ -70,9 +70,9 @@ namespace OpenSim.Services.AssetService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -68,9 +68,9 @@ namespace OpenSim.Services.AssetService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -81,16 +81,16 @@ namespace OpenSim.Services.AuthenticationService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}
//
// We tried, but this doesn't exist. We can't proceed.
//
if (dllName == String.Empty || realm == String.Empty)
if (dllName.Length == 0 || realm.Length == 0)
throw new Exception("No StorageProvider configured");
m_Database = LoadPlugin<IAuthenticationData>(dllName,

View File

@@ -71,16 +71,16 @@ namespace OpenSim.Services.AuthenticationService
{
m_log.DebugFormat("[AUTH SERVICE]: Attempting web key authentication for PrincipalID {0}", principalID);
result = m_svcChecks["web_login_key"].Authenticate(principalID, password, lifetime, out realID);
if (result == String.Empty)
if (result.Length == 0)
{
m_log.DebugFormat("[AUTH SERVICE]: Web Login failed for PrincipalID {0}", principalID);
}
}
if (result == string.Empty && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
if (result.Length == 0 && data.Data.ContainsKey("passwordHash") && data.Data.ContainsKey("passwordSalt"))
{
m_log.DebugFormat("[AUTH SERVICE]: Attempting password authentication for PrincipalID {0}", principalID);
result = m_svcChecks["password"].Authenticate(principalID, password, lifetime, out realID);
if (result == String.Empty)
if (result.Length == 0)
{
m_log.DebugFormat("[AUTH SERVICE]: Password login failed for PrincipalID {0}", principalID);
}
@@ -88,7 +88,7 @@ namespace OpenSim.Services.AuthenticationService
if (result == string.Empty)
if (result.Length == 0)
{
m_log.DebugFormat("[AUTH SERVICE]: Both password and webLoginKey-based authentication failed for PrincipalID {0}", principalID);
}

View File

@@ -60,9 +60,9 @@ namespace OpenSim.Services.AuthorizationService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -52,9 +52,9 @@ namespace OpenSim.Services.AvatarService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -326,7 +326,7 @@ namespace OpenSim.Services.Connectors
// trigger since current callers don't pass emtpy IDs
// We need the asset ID to route the request to the proper
// cluster member, so we can't have the server assign one.
if (asset.ID == string.Empty || asset.ID == stringUUIDZero)
if (asset.ID.Length == 0 || asset.ID == stringUUIDZero)
{
if (asset.FullID.IsZero())
{

View File

@@ -74,7 +74,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = assetConfig.GetString("AuthenticationServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[AUTH CONNECTOR]: No Server URI named in section AuthenticationService");
throw new Exception("Authentication connector init error");

View File

@@ -72,7 +72,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = authorizationConfig.GetString("AuthorizationServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[AUTHORIZATION CONNECTOR]: No Server URI named in section AuthorizationService");
throw new Exception("Authorization connector init error");

View File

@@ -76,7 +76,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = gridConfig.GetString("AvatarServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[AVATAR CONNECTOR]: No Server URI named in section AvatarService");
throw new Exception("Avatar connector init error");
@@ -118,7 +118,7 @@ namespace OpenSim.Services.Connectors
try
{
reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth);
if (reply == null || (reply != null && reply == string.Empty))
if (string.IsNullOrEmpty(reply))
{
m_log.DebugFormat("[AVATAR CONNECTOR]: GetAgent received null or empty reply");
return null;

View File

@@ -69,7 +69,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = gridConfig.GetString("EstateServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[ESTATE CONNECTOR]: No Server URI named in section EstateService");
throw new Exception("Estate connector init error");

View File

@@ -73,7 +73,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = freeswitchConfig.GetString("FreeswitchServiceURL",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[FREESWITCH CONNECTOR]: No FreeswitchServiceURL named in section FreeSwitchVoice");
throw new Exception("Freeswitch connector init error");

View File

@@ -75,7 +75,7 @@ namespace OpenSim.Services.Connectors.Friends
string serviceURI = gridConfig.GetString("FriendsServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[FRIENDS SERVICE CONNECTOR]: No Server URI named in section FriendsService");
throw new Exception("Friends connector init error");

View File

@@ -75,7 +75,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = gridConfig.GetString("GridServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[GRID CONNECTOR]: No Server URI named in section GridService");
throw new Exception("Grid connector init error");
@@ -106,7 +106,7 @@ namespace OpenSim.Services.Connectors
try
{
string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, reqString, m_Auth);
if (reply != string.Empty)
if (!string.IsNullOrEmpty(reply))
{
Dictionary<string, object> replyData = ServerUtils.ParseXmlResponse(reply);

View File

@@ -257,7 +257,7 @@ namespace OpenSim.Services.Connectors
uri,
reqString,
m_Auth);
if (reply == null || (reply != null && reply == string.Empty))
if (string.IsNullOrEmpty(reply))
{
m_log.DebugFormat("[GRID USER CONNECTOR]: GetGridUserInfo received null or empty reply");
return null;

View File

@@ -63,7 +63,7 @@ namespace OpenSim.Services.Connectors
// http://valley.virtualportland.org/simtest/Grid/?id=
//
uri = new Uri(serverURI + "xxx");
if (uri.Query == string.Empty)
if (uri.Query.Length == 0)
m_ServerURI = serverURI.TrimEnd('/') + "/helo/";
else
{

View File

@@ -100,7 +100,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = config.GetString("InventoryServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[INVENTORY CONNECTOR]: No Server URI named in section InventoryService");
throw new Exception("Inventory connector init error");

View File

@@ -78,7 +78,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = config.GetString("MapImageServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[MAP IMAGE CONNECTOR]: No Server URI named in section MapImageService");
throw new Exception("MapImage connector init error");

View File

@@ -73,7 +73,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = gridConfig.GetString("MuteListServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[MUTELIST CONNECTOR]: No Server URI named in section GridUserService");
throw new Exception("MuteList connector init error");

View File

@@ -73,7 +73,7 @@ namespace OpenSim.Services.Connectors
string serviceURI = gridConfig.GetString("PresenceServerURI",
String.Empty);
if (serviceURI == String.Empty)
if (serviceURI.Length == 0)
{
m_log.Error("[PRESENCE CONNECTOR]: No Server URI named in section PresenceService");
throw new Exception("Presence connector init error");

View File

@@ -70,7 +70,7 @@ namespace OpenSim.Services.EstateService
}
// We tried, but this doesn't exist. We can't proceed
if (dllName == String.Empty)
if (dllName.Length == 0)
throw new Exception("No StorageProvider configured");
m_database = LoadPlugin<IEstateDataStore>(dllName, new Object[] { connString });

View File

@@ -130,10 +130,10 @@ namespace OpenSim.Services.FSAssetService
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connectionString == String.Empty)
if (connectionString.Length == 0)
connectionString = dbConfig.GetString("ConnectionString", String.Empty);
}
@@ -178,7 +178,7 @@ namespace OpenSim.Services.FSAssetService
Directory.CreateDirectory(spoolTmp);
m_FSBase = assetConfig.GetString("BaseDirectory", String.Empty);
if (m_FSBase == String.Empty)
if (m_FSBase.Length == 0)
{
m_log.ErrorFormat("[FSASSETS]: BaseDirectory not specified");
throw new Exception("Configuration error");
@@ -668,7 +668,7 @@ namespace OpenSim.Services.FSAssetService
}
}
if (asset.ID == string.Empty)
if (asset.ID.Length == 0)
{
if (asset.FullID.IsZero())
{

View File

@@ -62,7 +62,7 @@ namespace OpenSim.Services.FreeswitchService
if (freeswitchConfig != null)
{
m_freeSwitchDefaultWellKnownIP = freeswitchConfig.GetString("ServerAddress", String.Empty);
if (m_freeSwitchDefaultWellKnownIP == String.Empty)
if (m_freeSwitchDefaultWellKnownIP.Length == 0)
{
m_log.Error("[FREESWITCH]: No ServerAddress given, cannot start service.");
return;

View File

@@ -61,9 +61,9 @@ namespace OpenSim.Services.Friends
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -52,9 +52,9 @@ namespace OpenSim.Services.GridService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -224,7 +224,7 @@ namespace OpenSim.Services.GridService
regInfo.RegionSizeX = sizeX;
regInfo.RegionSizeY = sizeY;
if (externalName == string.Empty)
if (externalName.Length == 0)
regInfo.RegionName = regInfo.ServerURI;
else
regInfo.RegionName = externalName;
@@ -402,7 +402,7 @@ namespace OpenSim.Services.GridService
regInfo.RegionSizeX = sizeX;
regInfo.RegionSizeY = sizeY;
if (externalName == string.Empty)
if (externalName.Length == 0)
regInfo.RegionName = regInfo.ServerURI;
else
regInfo.RegionName = externalName;

View File

@@ -96,7 +96,7 @@ namespace OpenSim.Services.HypergridService
string gridUserService = serverConfig.GetString("GridUserService", string.Empty);
string bansService = serverConfig.GetString("BansService", string.Empty);
// These are mandatory, the others aren't
if (gridService == string.Empty || presenceService == string.Empty)
if (gridService.Length == 0 || presenceService.Length == 0)
throw new Exception("Incomplete specifications, Gatekeeper Service cannot function.");
string scope = serverConfig.GetString("ScopeID", UUID.Zero.ToString());
@@ -205,8 +205,8 @@ namespace OpenSim.Services.HypergridService
reason = string.Empty;
GridRegion region = null;
//m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", (regionName == string.Empty)? "default region" : regionName);
if (!m_AllowTeleportsToAnyRegion || regionName == string.Empty)
//m_log.DebugFormat("[GATEKEEPER SERVICE]: Request to link to {0}", (regionName.Length == 0)? "default region" : regionName);
if (!m_AllowTeleportsToAnyRegion || regionName.Length == 0)
{
List<GridRegion> defs = m_GridService.GetDefaultHypergridRegions(m_ScopeID);
if (defs != null && defs.Count > 0)

View File

@@ -71,7 +71,7 @@ namespace OpenSim.Services.HypergridService
throw new Exception("No HGAssetService configuration");
string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty);
if (userAccountsDll == string.Empty)
if (userAccountsDll.Length == 0)
throw new Exception("Please specify UserAccountsService in HGAssetService configuration");
Object[] args = new Object[] { config };
@@ -81,7 +81,7 @@ namespace OpenSim.Services.HypergridService
m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI",
new string[] { "Startup", "Hypergrid", configName }, string.Empty);
if (m_HomeURL == string.Empty)
if (m_HomeURL.Length == 0)
throw new Exception("[HGAssetService] No HomeURI specified");
m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);

View File

@@ -65,7 +65,7 @@ namespace OpenSim.Services.HypergridService
throw new Exception("No HGAssetService configuration");
string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty);
if (userAccountsDll == string.Empty)
if (userAccountsDll.Length == 0)
throw new Exception("Please specify UserAccountsService in HGAssetService configuration");
Object[] args = new Object[] { config };
@@ -75,7 +75,7 @@ namespace OpenSim.Services.HypergridService
m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI",
new string[] { "Startup", "Hypergrid", configName }, string.Empty);
if (m_HomeURL == string.Empty)
if (m_HomeURL.Length == 0)
throw new Exception("[HGAssetService] No HomeURI specified");
m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);

View File

@@ -85,22 +85,22 @@ namespace OpenSim.Services.HypergridService
throw new Exception(String.Format("No section {0} in config file", m_ConfigName));
string theService = serverConfig.GetString("FriendsService", string.Empty);
if (theService == String.Empty)
if (theService.Length == 0)
throw new Exception("No FriendsService in config file " + m_ConfigName);
m_FriendsService = ServerUtils.LoadPlugin<IFriendsService>(theService, args);
theService = serverConfig.GetString("UserAccountService", string.Empty);
if (theService == String.Empty)
if (theService.Length == 0)
throw new Exception("No UserAccountService in " + m_ConfigName);
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(theService, args);
theService = serverConfig.GetString("GridService", string.Empty);
if (theService == String.Empty)
if (theService.Length == 0)
throw new Exception("No GridService in " + m_ConfigName);
m_GridService = ServerUtils.LoadPlugin<IGridService>(theService, args);
theService = serverConfig.GetString("PresenceService", string.Empty);
if (theService == String.Empty)
if (theService.Length == 0)
throw new Exception("No PresenceService in " + m_ConfigName);
m_PresenceService = ServerUtils.LoadPlugin<IPresenceService>(theService, args);

View File

@@ -73,7 +73,7 @@ namespace OpenSim.Services.HypergridService
{
// realm = authConfig.GetString("Realm", realm);
string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty);
if (userAccountsDll == string.Empty)
if (userAccountsDll.Length == 0)
throw new Exception("Please specify UserAccountsService in HGInventoryService configuration");
Object[] args = new Object[] { config };

View File

@@ -71,7 +71,7 @@ namespace OpenSim.Services.HypergridService
Object[] args = new Object[] { config };
string assetConnectorDll = assetConfig.GetString("AssetConnector", String.Empty);
if (assetConnectorDll == String.Empty)
if (assetConnectorDll.Length == 0)
throw new Exception("Please specify AssetConnector in HGAssetService configuration");
m_assetConnector = ServerUtils.LoadPlugin<IAssetService>(assetConnectorDll, args);
@@ -79,7 +79,7 @@ namespace OpenSim.Services.HypergridService
throw new Exception(String.Format("Unable to create AssetConnector from {0}", assetConnectorDll));
string userAccountsDll = assetConfig.GetString("UserAccountsService", string.Empty);
if (userAccountsDll == string.Empty)
if (userAccountsDll.Length == 0)
throw new Exception("Please specify UserAccountsService in HGAssetService configuration");
m_UserAccountService = ServerUtils.LoadPlugin<IUserAccountService>(userAccountsDll, args);
@@ -88,7 +88,7 @@ namespace OpenSim.Services.HypergridService
m_HomeURL = Util.GetConfigVarFromSections<string>(config, "HomeURI",
new string[] { "Startup", "Hypergrid", configName }, string.Empty);
if (m_HomeURL == string.Empty)
if (m_HomeURL.Length == 0)
throw new Exception("[HGAssetService] No HomeURI specified");
m_Cache = UserAccountCache.CreateUserAccountCache(m_UserAccountService);

View File

@@ -80,7 +80,7 @@ namespace OpenSim.Services.HypergridService
if (invConfig != null)
{
string userAccountsDll = invConfig.GetString("UserAccountsService", string.Empty);
if (userAccountsDll == string.Empty)
if (userAccountsDll.Length == 0)
throw new Exception("Please specify UserAccountsService in HGInventoryService configuration");
Object[] args = new Object[] { config };
@@ -89,7 +89,7 @@ namespace OpenSim.Services.HypergridService
throw new Exception(String.Format("Unable to create UserAccountService from {0}", userAccountsDll));
string avatarDll = invConfig.GetString("AvatarService", string.Empty);
if (avatarDll == string.Empty)
if (avatarDll.Length == 0)
throw new Exception("Please specify AvatarService in HGInventoryService configuration");
m_AvatarService = ServerUtils.LoadPlugin<IAvatarService>(avatarDll, args);

View File

@@ -117,7 +117,7 @@ namespace OpenSim.Services.HypergridService
m_BypassClientVerification = serverConfig.GetBoolean("BypassClientVerification", false);
if (gridService == string.Empty || gridUserService == string.Empty || gatekeeperService == string.Empty)
if (gridService.Length == 0 || gridUserService.Length == 0 || gatekeeperService.Length == 0)
throw new Exception(String.Format("Incomplete specifications, UserAgent Service cannot function."));
Object[] args = new Object[] { config };
@@ -141,7 +141,7 @@ namespace OpenSim.Services.HypergridService
if (string.IsNullOrEmpty(m_GridName)) // Legacy. Remove soon.
{
m_GridName = serverConfig.GetString("ExternalName", string.Empty);
if (m_GridName == string.Empty)
if (m_GridName.Length == 0)
{
serverConfig = config.Configs["GatekeeperService"];
m_GridName = serverConfig.GetString("ExternalName", string.Empty);

View File

@@ -52,9 +52,9 @@ namespace OpenSim.Services.HypergridService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -80,16 +80,16 @@ namespace OpenSim.Services.InventoryService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}
//
// We tried, but this doesn't exist. We can't proceed.
//
if (dllName == String.Empty)
if (dllName.Length == 0)
throw new Exception("No StorageProvider configured");
m_Database = LoadPlugin<IXInventoryData>(dllName,

View File

@@ -165,7 +165,7 @@ namespace OpenSim.Services.LLLoginService
if (messagingConfig != null)
m_messageKey = messagingConfig.GetString("MessageKey", string.Empty);
// These are required; the others aren't
if (accountService == string.Empty || authService == string.Empty)
if (accountService.Length == 0 || authService.Length == 0)
throw new Exception("LoginService is missing service specifications");
// replace newlines in welcome message
@@ -266,7 +266,7 @@ namespace OpenSim.Services.LLLoginService
//
string token = m_AuthenticationService.Authenticate(account.PrincipalID, passwd, 30);
UUID secureSession = UUID.Zero;
if ((token == string.Empty) || (!UUID.TryParse(token, out secureSession)))
if ((token.Length == 0) || (!UUID.TryParse(token, out secureSession)))
{
m_log.InfoFormat("[LLOGIN SERVICE]: SetLevel failed, reason: authentication failed");
return response;
@@ -919,7 +919,7 @@ namespace OpenSim.Services.LLLoginService
{
if (gatekeeper == null) // login to local grid
{
if (hostName == string.Empty)
if (hostName.Length == 0)
SetHostAndPort(m_GatekeeperURL);
gatekeeper = new GridRegion(destination);

View File

@@ -69,7 +69,7 @@ namespace OpenSim.Services.EstateService
}
// We tried, but this doesn't exist. We can't proceed
if (dllName == String.Empty)
if (dllName.Length == 0)
throw new Exception("No StorageProvider configured");
m_database = LoadPlugin<IMuteListData>(dllName, new Object[] { connString });

View File

@@ -52,9 +52,9 @@ namespace OpenSim.Services.PresenceService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -71,7 +71,7 @@ namespace OpenSim.Services.SimulationService
}
// We tried, but this doesn't exist. We can't proceed
if (dllName == String.Empty)
if (dllName.Length == 0)
throw new Exception("No StorageProvider configured");
m_database = LoadPlugin<ISimulationDataStore>(dllName, new Object[] { connString });

View File

@@ -57,7 +57,7 @@ namespace OpenSim.Services.UserAccountService
dllName = userConfig.GetString("StorageProvider", dllName);
if (dllName == String.Empty)
if (dllName.Length == 0)
throw new Exception("No StorageProvider configured");
connString = userConfig.GetString("ConnectionString", connString);

View File

@@ -51,9 +51,9 @@ namespace OpenSim.Services.UserAccountService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (connString == String.Empty)
if (connString.Length == 0)
connString = dbConfig.GetString("ConnectionString", String.Empty);
}

View File

@@ -57,7 +57,7 @@ namespace OpenSim.Services.UserAccountService
dllName = userConfig.GetString("StorageProvider", dllName);
if (dllName == String.Empty)
if (dllName.Length == 0)
throw new Exception("No StorageProvider configured");
connString = userConfig.GetString("ConnectionString", connString);

View File

@@ -63,7 +63,7 @@ namespace OpenSim.Services.ProfilesService
IConfig dbConfig = config.Configs["DatabaseService"];
if (dbConfig != null)
{
if (dllName == String.Empty)
if (dllName.Length == 0)
dllName = dbConfig.GetString("StorageProvider", String.Empty);
if (string.IsNullOrEmpty(connString))
connString = dbConfig.GetString("ConnectionString", String.Empty);