From b16abc8166c29585cb76cc55c3bdd76e5833cb4f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 5 Jan 2017 19:07:37 +0000 Subject: Massive tab and trailing space cleanup --- .../AgentPreferences/AgentPreferencesConnector.cs | 2 +- .../Connectors/Asset/AssetServicesConnector.cs | 22 +++++++-------- .../AuthorizationServicesConnector.cs | 16 +++++------ .../Connectors/Avatar/AvatarServicesConnector.cs | 4 +-- .../Connectors/Friends/FriendsServicesConnector.cs | 2 +- .../Connectors/Grid/GridServicesConnector.cs | 4 +-- .../Hypergrid/GatekeeperServiceConnector.cs | 2 +- .../Connectors/Hypergrid/HeloServicesConnector.cs | 2 +- .../Hypergrid/UserAgentServiceConnector.cs | 12 ++++---- .../Inventory/XInventoryServicesConnector.cs | 24 ++++++++-------- .../Connectors/Land/LandServicesConnector.cs | 6 ++-- .../Presence/PresenceServicesConnector.cs | 8 +++--- .../Services/Connectors/Properties/AssemblyInfo.cs | 8 +++--- .../SimianGrid/SimianAssetServiceConnector.cs | 32 +++++++++++----------- .../SimianGrid/SimianAvatarServiceConnector.cs | 8 +++--- .../SimianGrid/SimianExternalCapsModule.cs | 16 +++++------ .../Services/Connectors/SimianGrid/SimianGrid.cs | 18 ++++++------ .../SimianGrid/SimianGridMaptileModule.cs | 16 +++++------ .../SimianGrid/SimianGridServiceConnector.cs | 8 +++--- .../SimianGrid/SimianInventoryServiceConnector.cs | 8 +++--- .../SimianGrid/SimianPresenceServiceConnector.cs | 10 +++---- .../Connectors/SimianGrid/SimianProfiles.cs | 6 ++-- .../SimianUserAccountServiceConnector.cs | 6 ++-- .../Simulation/SimulationServiceConnector.cs | 24 ++++++++-------- .../UserAccounts/UserAccountServicesConnector.cs | 4 +-- 25 files changed, 134 insertions(+), 134 deletions(-) (limited to 'OpenSim/Services/Connectors') diff --git a/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs b/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs index 0e72c8b..bd342fa 100644 --- a/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs +++ b/OpenSim/Services/Connectors/AgentPreferences/AgentPreferencesConnector.cs @@ -110,7 +110,7 @@ namespace OpenSim.Services.Connectors { m_log.DebugFormat("[AGENT PREFERENCES CONNECTOR]: Exception when contacting agent preferences server at {0}: {1}", uri, e.Message); } - + Dictionary replyData = ServerUtils.ParseXmlResponse(reply); if (replyData != null) { diff --git a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs index bdc3bef..3fa8b54 100644 --- a/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs +++ b/OpenSim/Services/Connectors/Asset/AssetServicesConnector.cs @@ -55,7 +55,7 @@ namespace OpenSim.Services.Connectors private List[] m_sendRetries = new List[MAXSENDRETRIESLEN]; private System.Timers.Timer m_retryTimer; private int m_maxAssetRequestConcurrency = 30; - + private delegate void AssetRetrievedEx(AssetBase asset); // Keeps track of concurrent requests for the same asset, so that it's only loaded once. @@ -150,7 +150,7 @@ namespace OpenSim.Services.Connectors string prefix = id.Substring(0, 2).ToLower(); string host; - + // HG URLs will not be valid UUIDS if (m_UriMap.ContainsKey(prefix)) host = m_UriMap[prefix]; @@ -180,11 +180,11 @@ namespace OpenSim.Services.Connectors if(m_retryCounter >= 61 ) // avoid overflow 60 is max in use below m_retryCounter = 1; - int inUse = 0; + int inUse = 0; int nextlevel; - int timefactor; + int timefactor; List retrylist; - // we need to go down + // we need to go down for(int i = MAXSENDRETRIESLEN - 1; i >= 0; i--) { lock(m_sendRetries) @@ -219,13 +219,13 @@ namespace OpenSim.Services.Connectors lock(m_sendRetries) m_sendRetries[i] = null; - // we are the only ones with a copy of this retrylist now + // we are the only ones with a copy of this retrylist now foreach(AssetBase ass in retrylist) retryStore(ass, nextlevel); } lock(m_sendRetries) - { + { if(inUse == 0 ) m_retryTimer.Stop(); @@ -245,7 +245,7 @@ namespace OpenSim.Services.Connectors AssetBase asset = null; if (m_Cache != null) asset = m_Cache.Get(id); - + if (asset == null || asset.Data == null || asset.Data.Length == 0) { // XXX: Commented out for now since this has either never been properly operational or not for some time @@ -259,7 +259,7 @@ namespace OpenSim.Services.Connectors asset = SynchronousRestObjectRequester.MakeRequest("GET", uri, 0, m_Auth); - + if (m_Cache != null) { if (asset != null) @@ -438,7 +438,7 @@ namespace OpenSim.Services.Connectors // This is most likely to happen because the server doesn't support this function, // so just silently return "doesn't exist" for all the assets. } - + if (exist == null) exist = new bool[ids.Length]; @@ -557,7 +557,7 @@ namespace OpenSim.Services.Connectors if(nextRetryLevel >= MAXSENDRETRIESLEN) m_log.WarnFormat("[Assets] Upload giveup after several retries id: {0} type {1}", asset.ID.ToString(), asset.Type.ToString()); - else + else { lock(m_sendRetries) { diff --git a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs index d2da85f..a130f71 100644 --- a/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs +++ b/OpenSim/Services/Connectors/Authorization/AuthorizationServicesConnector.cs @@ -37,7 +37,7 @@ using OpenMetaverse; namespace OpenSim.Services.Connectors { - public class AuthorizationServicesConnector + public class AuthorizationServicesConnector { private static readonly ILog m_log = LogManager.GetLogger( @@ -45,7 +45,7 @@ namespace OpenSim.Services.Connectors private string m_ServerURI = String.Empty; private bool m_ResponseOnFailure = true; - + public AuthorizationServicesConnector() { } @@ -78,11 +78,11 @@ namespace OpenSim.Services.Connectors throw new Exception("Authorization connector init error"); } m_ServerURI = serviceURI; - + // this dictates what happens if the remote service fails, if the service fails and the value is true // the user is authorized for the region. bool responseOnFailure = authorizationConfig.GetBoolean("ResponseOnFailure",true); - + m_ResponseOnFailure = responseOnFailure; m_log.Info("[AUTHORIZATION CONNECTOR]: AuthorizationService initialized"); } @@ -91,11 +91,11 @@ namespace OpenSim.Services.Connectors { // do a remote call to the authorization server specified in the AuthorizationServerURI m_log.InfoFormat("[AUTHORIZATION CONNECTOR]: IsAuthorizedForRegion checking {0} at remote server {1}", userID, m_ServerURI); - + string uri = m_ServerURI; - + AuthorizationRequest req = new AuthorizationRequest(userID, firstname, surname, email, regionName, regionID); - + AuthorizationResponse response; try { @@ -114,7 +114,7 @@ namespace OpenSim.Services.Connectors } m_log.DebugFormat("[AUTHORIZATION CONNECTOR] response from remote service was {0}", response.Message); message = response.Message; - + return response.IsAuthorized; } diff --git a/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs b/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs index 3f44efa..424e95a 100644 --- a/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs +++ b/OpenSim/Services/Connectors/Avatar/AvatarServicesConnector.cs @@ -94,13 +94,13 @@ namespace OpenSim.Services.Connectors AvatarData avatar = GetAvatar(userID); return avatar.ToAvatarAppearance(); } - + public bool SetAppearance(UUID userID, AvatarAppearance appearance) { AvatarData avatar = new AvatarData(appearance); return SetAvatar(userID,avatar); } - + public AvatarData GetAvatar(UUID userID) { Dictionary sendData = new Dictionary(); diff --git a/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs index b7702a8..873b554 100644 --- a/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs +++ b/OpenSim/Services/Connectors/Friends/FriendsServicesConnector.cs @@ -86,7 +86,7 @@ namespace OpenSim.Services.Connectors.Friends #region IFriendsService - + public FriendInfo[] GetFriends(UUID PrincipalID) { Dictionary sendData = new Dictionary(); diff --git a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs index ceb2146..ded7806 100644 --- a/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs +++ b/OpenSim/Services/Connectors/Grid/GridServicesConnector.cs @@ -683,7 +683,7 @@ namespace OpenSim.Services.Connectors return rinfos; } - + public int GetRegionFlags(UUID scopeID, UUID regionID) { Dictionary sendData = new Dictionary(); @@ -755,7 +755,7 @@ namespace OpenSim.Services.Connectors if (reply != string.Empty) { Dictionary replyData = ServerUtils.ParseXmlResponse(reply); - + if ((replyData != null) && replyData.Count > 0) { foreach (string key in replyData.Keys) diff --git a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs index eef492d..e814c45 100644 --- a/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/GatekeeperServiceConnector.cs @@ -168,7 +168,7 @@ namespace OpenSim.Services.Connectors.Hypergrid string filename = string.Empty; try - { + { //m_log.Debug("JPEG: " + imageURL); string name = regionID.ToString(); filename = Path.Combine(storagePath, name + ".jpg"); diff --git a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs index b5e6d69..91e1740 100644 --- a/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/HeloServicesConnector.cs @@ -33,7 +33,7 @@ using Nini.Config; namespace OpenSim.Services.Connectors { - public class HeloServicesConnector + public class HeloServicesConnector { private static readonly ILog m_log = LogManager.GetLogger( diff --git a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs index 1b45bcf..b261675 100644 --- a/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs +++ b/OpenSim/Services/Connectors/Hypergrid/UserAgentServiceConnector.cs @@ -113,7 +113,7 @@ namespace OpenSim.Services.Connectors.Hypergrid return "homeagent/"; } - // The Login service calls this interface with fromLogin=true + // The Login service calls this interface with fromLogin=true // Sims call it with fromLogin=false // Either way, this is verified by the handler public bool LoginAgentToGrid(GridRegion source, AgentCircuitData aCircuit, GridRegion gatekeeper, GridRegion destination, bool fromLogin, out string reason) @@ -159,7 +159,7 @@ namespace OpenSim.Services.Connectors.Hypergrid } public void SetClientToken(UUID sessionID, string token) - { + { // no-op } @@ -416,7 +416,7 @@ namespace OpenSim.Services.Connectors.Hypergrid XmlRpcRequest request = new XmlRpcRequest("get_online_friends", paramList); // string reason = string.Empty; - + // Send and get reply List online = new List(); XmlRpcResponse response = null; @@ -497,7 +497,7 @@ namespace OpenSim.Services.Connectors.Hypergrid hash["userID"] = userID.ToString(); hash = CallServer("get_server_urls", hash); - + Dictionary serverURLs = new Dictionary(); foreach (object key in hash.Keys) { @@ -516,7 +516,7 @@ namespace OpenSim.Services.Connectors.Hypergrid Hashtable hash = new Hashtable(); hash["userID"] = userID.ToString(); - hash = CallServer("locate_user", hash); + hash = CallServer("locate_user", hash); string url = string.Empty; @@ -574,7 +574,7 @@ namespace OpenSim.Services.Connectors.Hypergrid { // We can not use m_ServerURL here anymore because it causes // the HTTP request to be built without a host name. This messes - // with OSGrid's NGINX and can make OSGrid avatars unable to TP + // with OSGrid's NGINX and can make OSGrid avatars unable to TP // to other grids running recent mono. response = request.Send(m_ServerURLHost, 10000); } diff --git a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs index bd5841b..dcf25ad 100644 --- a/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs +++ b/OpenSim/Services/Connectors/Inventory/XInventoryServicesConnector.cs @@ -63,7 +63,7 @@ namespace OpenSim.Services.Connectors /// In this case, -1 is default timeout (100 seconds), not infinite. /// private int m_requestTimeoutSecs = -1; - private string m_configName = "InventoryService"; + private string m_configName = "InventoryService"; private const double CACHE_EXPIRATION_SECONDS = 20.0; private static ExpiringCache m_ItemCache = new ExpiringCache(); @@ -80,7 +80,7 @@ namespace OpenSim.Services.Connectors public XInventoryServicesConnector(IConfigSource source, string configName) : base(source, configName) { - m_configName = configName; + m_configName = configName; Initialise(source); } @@ -114,13 +114,13 @@ namespace OpenSim.Services.Connectors StatsManager.RegisterStat( new Stat( - "RequestsMade", - "Requests made", - "Number of requests made to the remove inventory service", - "requests", - "inventory", - serviceURI, - StatType.Pull, + "RequestsMade", + "Requests made", + "Number of requests made to the remove inventory service", + "requests", + "inventory", + serviceURI, + StatType.Pull, MeasuresOfInterest.AverageChangeOverTime, s => s.Value = RequestsMade, StatVerbosity.Debug)); @@ -251,7 +251,7 @@ namespace OpenSim.Services.Connectors return inventory; } - + public virtual InventoryCollection[] GetMultipleFoldersContent(UUID principalID, UUID[] folderIDs) { InventoryCollection[] inventoryArr = new InventoryCollection[folderIDs.Length]; @@ -674,7 +674,7 @@ namespace OpenSim.Services.Connectors { "ASSET", assetID.ToString() } }); - // We cannot use CheckReturn() here because valid values for RESULT are "false" (in the case of request failure) or an int + // We cannot use CheckReturn() here because valid values for RESULT are "false" (in the case of request failure) or an int if (ret == null) return 0; @@ -719,7 +719,7 @@ namespace OpenSim.Services.Connectors reply = SynchronousRestFormsRequester.MakeRequest( "POST", m_ServerURI + "/xinventory", ServerUtils.BuildQueryString(sendData), m_requestTimeoutSecs, m_Auth); - + if (reply != String.Empty) break; diff --git a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs index 5e9331e..047880a 100644 --- a/OpenSim/Services/Connectors/Land/LandServicesConnector.cs +++ b/OpenSim/Services/Connectors/Land/LandServicesConnector.cs @@ -122,12 +122,12 @@ namespace OpenSim.Services.Connectors catch (Exception e) { m_log.ErrorFormat( - "[LAND CONNECTOR]: Got exception while parsing land-data: {0} {1}", + "[LAND CONNECTOR]: Got exception while parsing land-data: {0} {1}", e.Message, e.StackTrace); } } } - else + else m_log.WarnFormat("[LAND CONNECTOR]: Couldn't find region with handle {0}", regionHandle); } catch (Exception e) @@ -135,7 +135,7 @@ namespace OpenSim.Services.Connectors m_log.ErrorFormat( "[LAND CONNECTOR]: Couldn't contact region {0}: {1} {2}", regionHandle, e.Message, e.StackTrace); } - + return landData; } } diff --git a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs index 1f14b32..89d64ca 100644 --- a/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs +++ b/OpenSim/Services/Connectors/Presence/PresenceServicesConnector.cs @@ -107,7 +107,7 @@ namespace OpenSim.Services.Connectors { string reply = SynchronousRestFormsRequester.MakeRequest("POST", uri, - reqString, + reqString, m_Auth); if (reply != string.Empty) { @@ -315,8 +315,8 @@ namespace OpenSim.Services.Connectors } else { - if (replyData["result"].ToString() == "null") - return null; + if (replyData["result"].ToString() == "null") + return null; m_log.DebugFormat("[PRESENCE CONNECTOR]: Invalid reply (result not dictionary) received from presence server when querying for sessionID {0}", sessionID.ToString()); } @@ -366,7 +366,7 @@ namespace OpenSim.Services.Connectors if (replyData != null) { - if (replyData.ContainsKey("result") && + if (replyData.ContainsKey("result") && (replyData["result"].ToString() == "null" || replyData["result"].ToString() == "Failure")) { return new PresenceInfo[0]; diff --git a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs index 3c5ca7d..76d26d6 100644 --- a/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs +++ b/OpenSim/Services/Connectors/Properties/AssemblyInfo.cs @@ -2,7 +2,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("OpenSim.Services.Connectors")] @@ -14,8 +14,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -25,7 +25,7 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs index 531939f..121e863 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAssetServiceConnector.cs @@ -77,7 +77,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public string Name { get { return "SimianAssetServiceConnector"; } } public void AddRegion(Scene scene) { if (m_Enabled) { scene.RegisterModuleInterface(this); } } public void RemoveRegion(Scene scene) { if (m_Enabled) { scene.UnregisterModuleInterface(this); } } - + #endregion ISharedRegionModule public SimianAssetServiceConnector(IConfigSource source) @@ -143,7 +143,7 @@ namespace OpenSim.Services.Connectors.SimianGrid return SimianGetOperation(id); } - + public AssetBase GetCached(string id) { @@ -177,7 +177,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // return GetRemoteMetadata(id); return SimianGetMetadataOperation(id); } - + public byte[] GetData(string id) { if (String.IsNullOrEmpty(m_serverUrl)) @@ -296,7 +296,7 @@ namespace OpenSim.Services.Connectors.SimianGrid return SimianStoreOperation(asset); } - + /// /// Update an asset's content /// @@ -344,7 +344,7 @@ namespace OpenSim.Services.Connectors.SimianGrid return SimianDeleteOperation(id); } - + #endregion IAssetService #region SimianOperations @@ -369,9 +369,9 @@ namespace OpenSim.Services.Connectors.SimianGrid m_log.WarnFormat("[SIMIAN ASSET CONNECTOR]: failed to delete asset; {0}",response["Message"].AsString()); return false; } - + return true; - + } catch (Exception ex) { @@ -400,7 +400,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { "Temporary", asset.Temporary ? "1" : "0" }, { "Name", asset.Name } }; - + OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); if (! response["Success"].AsBoolean()) { @@ -410,13 +410,13 @@ namespace OpenSim.Services.Connectors.SimianGrid // asset.ID is always set before calling this function return asset.ID; - + } catch (Exception ex) { m_log.ErrorFormat("[SIMIAN ASSET CONNECTOR] failed to store asset; {0}",ex.Message); } - + return null; } @@ -427,12 +427,12 @@ namespace OpenSim.Services.Connectors.SimianGrid /// private AssetBase SimianGetOperation(string id) { - try + try { NameValueCollection requestArgs = new NameValueCollection { { "RequestMethod", "xGetAsset" }, - { "ID", id } + { "ID", id } }; OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); @@ -441,7 +441,7 @@ namespace OpenSim.Services.Connectors.SimianGrid m_log.WarnFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset; {0}",response["Message"].AsString()); return null; } - + AssetBase asset = new AssetBase(); asset.ID = id; @@ -475,7 +475,7 @@ namespace OpenSim.Services.Connectors.SimianGrid NameValueCollection requestArgs = new NameValueCollection { { "RequestMethod", "xGetAssetMetadata" }, - { "ID", id } + { "ID", id } }; OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); @@ -485,7 +485,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // m_log.DebugFormat("[SIMIAN ASSET CONNECTOR] Failed to get asset metadata; {0}",response["Message"].AsString()); return null; } - + AssetMetadata metadata = new AssetMetadata(); metadata.ID = id; metadata.ContentType = response["ContentType"].AsString(); @@ -620,7 +620,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // } // string errorMessage = null; - + // // Build the remote storage request // List postParameters = new List() // { diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index a52dd6c..34bb274 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs @@ -146,7 +146,7 @@ namespace OpenSim.Services.Connectors.SimianGrid userID,response["Message"].AsString()); return null; } - + // // // @@ -178,7 +178,7 @@ namespace OpenSim.Services.Connectors.SimianGrid return success; } - + // // // @@ -219,7 +219,7 @@ namespace OpenSim.Services.Connectors.SimianGrid appearance.AvatarHeight = (float)map["Height"].AsReal(); AvatarData avatar = new AvatarData(appearance); - + // Get attachments map = null; try { map = OSDParser.DeserializeJson(response["LLAttachments"].AsString()) as OSDMap; } @@ -230,7 +230,7 @@ namespace OpenSim.Services.Connectors.SimianGrid foreach (KeyValuePair kvp in map) avatar.Data[kvp.Key] = kvp.Value.AsString(); } - + return avatar; } else diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs index 764e71f..49bd9a4 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianExternalCapsModule.cs @@ -55,7 +55,7 @@ namespace OpenSim.Services.Connectors.SimianGrid private bool m_enabled = true; private Scene m_scene; private String m_simianURL; - + #region IRegionModule Members public string Name @@ -65,10 +65,10 @@ namespace OpenSim.Services.Connectors.SimianGrid public void Initialise(IConfigSource config) { - try + try { IConfig m_config; - + if ((m_config = config.Configs["SimianExternalCaps"]) != null) { m_enabled = m_config.GetBoolean("Enabled", m_enabled); @@ -97,10 +97,10 @@ namespace OpenSim.Services.Connectors.SimianGrid public void Close() { } public void AddRegion(Scene scene) - { + { if (! m_enabled) return; - + m_scene = scene; m_scene.RegisterModuleInterface(this); } @@ -153,7 +153,7 @@ namespace OpenSim.Services.Connectors.SimianGrid subs["%USR%"] = agentID.ToString(); subs["%CAP%"] = cap.ToString(); subs["%SIM%"] = m_scene.RegionInfo.RegionID.ToString(); - + caps.RegisterHandler(capName,ExpandSkeletonURL(urlSkel,subs)); return true; } @@ -168,12 +168,12 @@ namespace OpenSim.Services.Connectors.SimianGrid private String ExpandSkeletonURL(String urlSkel, Dictionary subs) { String result = urlSkel; - + foreach (KeyValuePair kvp in subs) { result = result.Replace(kvp.Key,kvp.Value); } - + return result; } } diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs index a35d749..b29adb3 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGrid.cs @@ -52,20 +52,20 @@ namespace OpenSim.Services.Connectors.SimianGrid private IConfig m_config = null; private String m_simianURL; - + #region IRegionModule Members public string Name { get { return this.GetType().Name; } } - + public void Initialise(IConfigSource config) { - try + try { m_config = config.Configs["SimianGrid"]; - + if (m_config != null) { m_simianURL = m_config.GetString("SimianServiceURL"); @@ -74,7 +74,7 @@ namespace OpenSim.Services.Connectors.SimianGrid // m_log.DebugFormat("[SimianGrid] service URL is not defined"); return; } - + InitialiseSimCap(); SimulatorCapability = SimulatorCapability.Trim(); m_log.InfoFormat("[SimianExternalCaps] using {0} as simulator capability",SimulatorCapability); @@ -100,7 +100,7 @@ namespace OpenSim.Services.Connectors.SimianGrid /// /// Try a variety of methods for finding the simian simulator capability; first check the - /// configuration itself, then look for a file that contains the cap, then finally look + /// configuration itself, then look for a file that contains the cap, then finally look /// for an environment variable that contains it. /// private void InitialiseSimCap() @@ -110,7 +110,7 @@ namespace OpenSim.Services.Connectors.SimianGrid SimulatorCapability = m_config.GetString("SimulatorCapability"); return; } - + if (m_config.Contains("SimulatorCapabilityFile")) { String filename = m_config.GetString("SimulatorCapabilityFile"); @@ -120,7 +120,7 @@ namespace OpenSim.Services.Connectors.SimianGrid return; } } - + if (m_config.Contains("SimulatorCapabilityVariable")) { String envname = m_config.GetString("SimulatorCapabilityVariable"); @@ -134,7 +134,7 @@ namespace OpenSim.Services.Connectors.SimianGrid m_log.WarnFormat("[SimianExternalCaps] no method specified for simulator capability"); } - + #endregion public static String SimulatorCapability = UUID.Zero.ToString(); diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs index 8375c95..4896d09 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridMaptileModule.cs @@ -65,14 +65,14 @@ namespace OpenSim.Services.Connectors.SimianGrid private int m_refreshtime = 0; private int m_lastrefresh = 0; private System.Timers.Timer m_refreshTimer = new System.Timers.Timer(); - + #region ISharedRegionModule - + public Type ReplaceableInterface { get { return null; } } - public string Name { get { return "SimianGridMaptile"; } } + public string Name { get { return "SimianGridMaptile"; } } public void RegionLoaded(Scene scene) { } public void Close() { } - + /// /// /// @@ -81,7 +81,7 @@ namespace OpenSim.Services.Connectors.SimianGrid IConfig config = source.Configs["SimianGridMaptiles"]; if (config == null) return; - + if (! config.GetBoolean("Enabled", false)) return; @@ -218,7 +218,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { uint locX = scene.RegionInfo.RegionLocX + (xx / Constants.RegionSize); uint locY = scene.RegionInfo.RegionLocY + (yy / Constants.RegionSize); - + ConvertAndUploadMaptile(subMapTile, locX, locY); } } @@ -232,7 +232,7 @@ namespace OpenSim.Services.Connectors.SimianGrid } } - + /// /// /// @@ -255,7 +255,7 @@ namespace OpenSim.Services.Connectors.SimianGrid { "ContentType", "image/png" }, { "EncodedData", System.Convert.ToBase64String(pngData) } }; - + OSDMap response = SimianGrid.PostToService(m_serverUrl,requestArgs); if (! response["Success"].AsBoolean()) { diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs index bd35c6f..f8eebbe 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianGridServiceConnector.cs @@ -91,7 +91,7 @@ namespace OpenSim.Services.Connectors.SimianGrid m_log.Error("[SIMIAN GRID CONNECTOR]: No Server URI named in section GridService"); throw new Exception("Grid connector init error"); } - + if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) serviceUrl = serviceUrl + '/'; m_ServerURI = serviceUrl; @@ -230,7 +230,7 @@ namespace OpenSim.Services.Connectors.SimianGrid }; // m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request grid at {0}",position.ToString()); - + OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) { @@ -308,7 +308,7 @@ namespace OpenSim.Services.Connectors.SimianGrid }; //m_log.DebugFormat("[SIMIAN GRID CONNECTOR] request regions by range {0} to {1}",minPosition.ToString(),maxPosition.ToString()); - + OSDMap response = SimianGrid.PostToService(m_ServerURI, requestArgs); if (response["Success"].AsBoolean()) @@ -413,7 +413,7 @@ namespace OpenSim.Services.Connectors.SimianGrid return -1; } } - + public Dictionary GetExtraFeatures() { /// See SimulatorFeaturesModule - Need to get map, search and destination guide diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs index 3d35834..9eefd16 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianInventoryServiceConnector.cs @@ -535,7 +535,7 @@ namespace OpenSim.Services.Connectors.SimianGrid allSuccess = false; } } - + return allSuccess; } @@ -727,11 +727,11 @@ namespace OpenSim.Services.Connectors.SimianGrid /// /// Get the union of permissions of all inventory items - /// that hold the given assetID. + /// that hold the given assetID. /// /// /// - /// The permissions or 0 if no such asset is found in + /// The permissions or 0 if no such asset is found in /// the user's inventory public int GetAssetPermissions(UUID userID, UUID assetID) { @@ -787,7 +787,7 @@ namespace OpenSim.Services.Connectors.SimianGrid if (item != null && item["Type"].AsString() == "Item") { InventoryItemBase invItem = new InventoryItemBase(); - + invItem.AssetID = item["AssetID"].AsUUID(); invItem.AssetType = SLUtil.ContentTypeToSLAssetType(item["ContentType"].AsString()); invItem.CreationDate = item["CreationDate"].AsInteger(); diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs index 211b775..08efefb 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianPresenceServiceConnector.cs @@ -121,7 +121,7 @@ namespace OpenSim.Services.Connectors.SimianGrid if (!serviceUrl.EndsWith("/") && !serviceUrl.EndsWith("=")) serviceUrl = serviceUrl + '/'; m_serverUrl = serviceUrl; - m_activityDetector = new SimianActivityDetector(this); + m_activityDetector = new SimianActivityDetector(this); m_Enabled = true; } } @@ -210,7 +210,7 @@ namespace OpenSim.Services.Connectors.SimianGrid m_log.WarnFormat("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve session {0}: {1}",sessionID.ToString(),sessionResponse["Message"].AsString()); return null; } - + UUID userID = sessionResponse["UserID"].AsUUID(); OSDMap userResponse = GetUserData(userID); if (userResponse == null) @@ -238,7 +238,7 @@ namespace OpenSim.Services.Connectors.SimianGrid m_log.WarnFormat("[SIMIAN PRESENCE CONNECTOR]: Failed to retrieve sessions: {0}",sessionListResponse["Message"].AsString()); return null; } - + OSDArray sessionList = sessionListResponse["Sessions"] as OSDArray; for (int i = 0; i < sessionList.Count; i++) { @@ -311,7 +311,7 @@ namespace OpenSim.Services.Connectors.SimianGrid public GridUserInfo GetGridUserInfo(string user) { - // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user); + // m_log.DebugFormat("[SIMIAN PRESENCE CONNECTOR]: Requesting session data for agent " + user); UUID userID = new UUID(user); OSDMap userResponse = GetUserData(userID); @@ -421,7 +421,7 @@ namespace OpenSim.Services.Connectors.SimianGrid return null; } - + private string SerializeLocation(UUID regionID, Vector3 position, Vector3 lookAt) { return "{" + String.Format("\"SceneID\":\"{0}\",\"Position\":\"{1}\",\"LookAt\":\"{2}\"", regionID, position, lookAt) + "}"; diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs index 17f4fc6..a388bcc 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianProfiles.cs @@ -70,7 +70,7 @@ namespace OpenSim.Services.Connectors.SimianGrid private bool m_Enabled = false; #region INonSharedRegionModule - + public Type ReplaceableInterface { get { return null; } } public void RegionLoaded(Scene scene) { } public void Close() { } @@ -284,7 +284,7 @@ namespace OpenSim.Services.Connectors.SimianGrid private void RequestAvatarPropertiesHandler(IClientAPI client, UUID avatarID) { m_log.DebugFormat("[SIMIAN PROFILES]: Request avatar properties for {0}",avatarID); - + OSDMap user = FetchUserData(avatarID); ProfileFlags flags = ProfileFlags.AllowPublish | ProfileFlags.MaturePublish; @@ -455,7 +455,7 @@ namespace OpenSim.Services.Connectors.SimianGrid private OSDMap FetchUserData(UUID userID) { m_log.DebugFormat("[SIMIAN PROFILES]: Fetch information about {0}",userID); - + NameValueCollection requestArgs = new NameValueCollection { { "RequestMethod", "GetUser" }, diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs index 6f613c1..115ae36 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianUserAccountServiceConnector.cs @@ -42,7 +42,7 @@ using OpenMetaverse.StructuredData; namespace OpenSim.Services.Connectors.SimianGrid { /// - /// Connects user account data (creating new users, looking up existing + /// Connects user account data (creating new users, looking up existing /// users) to the SimianGrid backend /// [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "SimianUserAccountServiceConnector")] @@ -220,7 +220,7 @@ namespace OpenSim.Services.Connectors.SimianGrid }; OSDMap response = SimianGrid.PostToService(m_serverUrl, requestArgs); - + if (response["Success"].AsBoolean()) { m_log.InfoFormat("[SIMIAN ACCOUNT CONNECTOR]: Storing user account data for " + data.Name); @@ -305,7 +305,7 @@ namespace OpenSim.Services.Connectors.SimianGrid account.LocalToGrid = true; if (response.ContainsKey("LocalToGrid")) account.LocalToGrid = (response["LocalToGrid"].AsString() == "true" ? true : false); - + GetFirstLastName(response["Name"].AsString(), out account.FirstName, out account.LastName); // Cache the user account info diff --git a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs index 8e1bf37..9f4d89a 100644 --- a/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs +++ b/OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs @@ -50,7 +50,7 @@ namespace OpenSim.Services.Connectors.Simulation // we use this dictionary to track the pending updateagent requests, maps URI --> position update private Dictionary m_updateAgentQueue = new Dictionary(); - + //private GridRegion m_Region; public SimulationServiceConnector() @@ -119,7 +119,7 @@ namespace OpenSim.Services.Connectors.Simulation m_log.DebugFormat("[REMOTE SIMULATION CONNECTOR]: Creating agent at {0}", destination.ServerURI); string uri = destination.ServerURI + AgentPath() + aCircuit.AgentID + "/"; - + try { OSDMap args = aCircuit.PackAgentCircuitData(ctx); @@ -137,7 +137,7 @@ namespace OpenSim.Services.Connectors.Simulation myipaddress = data["your_ip"].AsString(); return success; } - + // Try the old version, uncompressed result = WebUtil.PostToService(uri, args, 30000, false); @@ -155,10 +155,10 @@ namespace OpenSim.Services.Connectors.Simulation return success; } } - + m_log.WarnFormat( - "[REMOTE SIMULATION CONNECTOR]: Failed to create agent {0} {1} at remote simulator {2}", - aCircuit.firstname, aCircuit.lastname, destination.RegionName); + "[REMOTE SIMULATION CONNECTOR]: Failed to create agent {0} {1} at remote simulator {2}", + aCircuit.firstname, aCircuit.lastname, destination.RegionName); reason = result["Message"] != null ? result["Message"].AsString() : "error"; return false; } @@ -202,8 +202,8 @@ namespace OpenSim.Services.Connectors.Simulation { if (m_updateAgentQueue.ContainsKey(uri)) { - // Another thread is already handling - // updates for this simulator, just update + // Another thread is already handling + // updates for this simulator, just update // the position and return, overwrites are // not a problem since we only care about the // last update anyway @@ -304,7 +304,7 @@ namespace OpenSim.Services.Connectors.Simulation OSDMap request = new OSDMap(); request.Add("viaTeleport", OSD.FromBoolean(viaTeleport)); request.Add("position", OSD.FromString(position.ToString())); - // To those who still understad this field, we're telling them + // To those who still understad this field, we're telling them // the lowest version just to be safe request.Add("my_version", OSD.FromString(String.Format("SIMULATION/{0}", VersionInfo.SimulationServiceVersionSupportedMin))); // New simulation service negotiation @@ -374,7 +374,7 @@ namespace OpenSim.Services.Connectors.Simulation m_log.Info("[REMOTE SIMULATION CONNECTOR]: The above web util error was caused by a TP to a sim that doesn't support QUERYACCESS and can be ignored"); return true; } - + reason = result["Message"]; } else @@ -410,7 +410,7 @@ namespace OpenSim.Services.Connectors.Simulation { m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] QueryAcesss failed with exception; {0}",e.ToString()); } - + return false; } @@ -428,7 +428,7 @@ namespace OpenSim.Services.Connectors.Simulation { m_log.WarnFormat("[REMOTE SIMULATION CONNECTOR] ReleaseAgent failed with exception; {0}",e.ToString()); } - + return true; } diff --git a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs index 5bc7a1c..68ae7bb 100644 --- a/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs +++ b/OpenSim/Services/Connectors/UserAccounts/UserAccountServicesConnector.cs @@ -198,7 +198,7 @@ namespace OpenSim.Services.Connectors accs = doGetMultiUserAccounts(scopeID, IDs, out multisuported); if(multisuported) return accs; - + // service does not do multi accounts so need to do it one by one UUID uuid = UUID.Zero; @@ -344,7 +344,7 @@ namespace OpenSim.Services.Connectors return SendAndGetReply(sendData); } - + private UserAccount SendAndGetReply(Dictionary sendData) { string reply = string.Empty; -- cgit v1.1