mirror of
https://github.com/opensim/opensim.git
synced 2026-08-10 11:33:28 +08:00
== string.Empty is .Lenght == 0
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user