mirror of
https://github.com/opensim/opensim.git
synced 2026-08-06 01:06:30 +08:00
== string.Empty is .Lenght == 0
This commit is contained in:
@@ -62,12 +62,12 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||
|
||||
string theService = serverConfig.GetString("LocalServiceModule",
|
||||
String.Empty);
|
||||
if (theService == String.Empty)
|
||||
if (theService.Length == 0)
|
||||
throw new Exception("No LocalServiceModule in config file");
|
||||
m_TheService = ServerUtils.LoadPlugin<IHGFriendsService>(theService, args);
|
||||
|
||||
theService = serverConfig.GetString("UserAgentService", string.Empty);
|
||||
if (theService == String.Empty)
|
||||
if (theService.Length == 0)
|
||||
throw new Exception("No UserAgentService in " + m_ConfigName);
|
||||
m_UserAgentService = ServerUtils.LoadPlugin<IUserAgentService>(theService, new Object[] { config, localConn });
|
||||
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||
if (request.ContainsKey("SECRET"))
|
||||
secret = request["SECRET"].ToString();
|
||||
|
||||
if (secret == string.Empty)
|
||||
if (secret.Length == 0)
|
||||
return BoolResult(false);
|
||||
|
||||
bool success = m_TheService.DeleteFriendship(friend, secret);
|
||||
@@ -303,7 +303,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||
string sessionStr = request["SESSIONID"].ToString();
|
||||
|
||||
UUID sessionID;
|
||||
if (!UUID.TryParse(sessionStr, out sessionID) || serviceKey == string.Empty)
|
||||
if (!UUID.TryParse(sessionStr, out sessionID) || serviceKey.Length == 0)
|
||||
return false;
|
||||
|
||||
if (!m_UserAgentService.VerifyAgent(sessionID, serviceKey))
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
|
||||
int sizeX = 256;
|
||||
int sizeY = 256;
|
||||
|
||||
m_log.DebugFormat("[HG Handler]: XMLRequest to link to {0} from {1}", (name == string.Empty) ? "default region" : name, remoteClient.Address.ToString());
|
||||
m_log.DebugFormat("[HG Handler]: XMLRequest to link to {0} from {1}", (name.Length == 0) ? "default region" : name, remoteClient.Address.ToString());
|
||||
bool success = m_GatekeeperService.LinkRegion(name, out regionID, out regionHandle, out externalName, out imageURL, out reason, out sizeX, out sizeY);
|
||||
|
||||
Hashtable hash = new Hashtable();
|
||||
|
||||
Reference in New Issue
Block a user