mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
== string.Empty is .Lenght == 0
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user