From 6ef9d4da901a346c232458317cca6268da888e2e Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 18 Aug 2008 00:39:10 +0000 Subject: Formatting cleanup. --- .../Framework/Communications/Cache/AssetCache.cs | 14 ++++----- .../Communications/Cache/AssetServerBase.cs | 10 +++---- .../Communications/Cache/CachedUserInfo.cs | 6 ++-- .../Communications/Cache/GridAssetClient.cs | 2 +- .../Communications/Cache/InventoryFolderImpl.cs | 34 +++++++++++----------- .../Cache/UserProfileCacheService.cs | 2 +- .../Framework/Communications/Capabilities/Caps.cs | 4 +-- .../Capabilities/LLSDRemoteParcelResponse.cs | 2 +- .../Communications/CommunicationsManager.cs | 32 ++++++++++---------- OpenSim/Framework/Communications/IGridServices.cs | 6 ++-- .../IInterServiceInventoryServices.cs | 8 ++--- .../Framework/Communications/IInventoryServices.cs | 4 +-- .../Communications/ISecureInventoryService.cs | 8 ++--- .../Communications/InventoryServiceBase.cs | 6 ++-- OpenSim/Framework/Communications/LoginService.cs | 9 +++--- .../Framework/Communications/UserManagerBase.cs | 4 +-- 16 files changed, 75 insertions(+), 76 deletions(-) (limited to 'OpenSim/Framework/Communications') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 6eff690..e924b3f 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -143,10 +143,10 @@ namespace OpenSim.Framework.Communications.Cache public void Clear() { m_log.Info("[ASSET CACHE]: Clearing Asset cache"); - + if (StatsManager.SimExtraStats != null) StatsManager.SimExtraStats.ClearAssetCacheStatistics(); - + Initialize(); } @@ -365,9 +365,9 @@ namespace OpenSim.Framework.Communications.Cache } } else - { + { if (!Assets.ContainsKey(asset.FullID)) - { + { AssetInfo assetInf = new AssetInfo(asset); Assets.Add(assetInf.FullID, assetInf); @@ -382,7 +382,7 @@ namespace OpenSim.Framework.Communications.Cache } } - /// + /// /// Allows you to clear a specific asset by uuid out /// of the asset cache. This is needed because the osdynamic /// texture code grows the asset cache without bounds. The @@ -399,8 +399,8 @@ namespace OpenSim.Framework.Communications.Cache if (Textures.ContainsKey(uuid)) { Textures.Remove(uuid); - } - else if (Assets.ContainsKey(uuid)) + } + else if (Assets.ContainsKey(uuid)) { Assets.Remove(uuid); } diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index ed5b896..2c8e685 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs @@ -57,7 +57,7 @@ namespace OpenSim.Framework.Communications.Cache /// /// /// - /// Thrown if the request failed for some other reason than that the + /// Thrown if the request failed for some other reason than that the /// asset cannot be found. /// protected abstract AssetBase GetAsset(AssetRequest req); @@ -70,7 +70,7 @@ namespace OpenSim.Framework.Communications.Cache protected virtual void ProcessRequest(AssetRequest req) { AssetBase asset; - + try { asset = GetAsset(req); @@ -78,12 +78,12 @@ namespace OpenSim.Framework.Communications.Cache catch (Exception e) { m_log.ErrorFormat("[ASSET]: Asset request for {0} threw exception {1}", req.AssetID, e); - + if (StatsManager.SimExtraStats != null) StatsManager.SimExtraStats.AddAssetServiceRequestFailure(); - + m_receiver.AssetNotFound(req.AssetID, req.IsTexture); - + return; } diff --git a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs index 57f5e76..c337907 100644 --- a/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs +++ b/OpenSim/Framework/Communications/Cache/CachedUserInfo.cs @@ -91,8 +91,8 @@ namespace OpenSim.Framework.Communications.Cache get { return m_session_id; } set { m_session_id = value; } } - private LLUUID m_session_id = LLUUID.Zero; - + private LLUUID m_session_id = LLUUID.Zero; + /// /// Constructor /// @@ -172,7 +172,7 @@ namespace OpenSim.Framework.Communications.Cache } } } - + /// /// Drop all cached inventory. /// diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs index 4206cae..9cccf66 100644 --- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs @@ -60,7 +60,7 @@ namespace OpenSim.Framework.Communications.Cache rc.AddQueryParameter("texture"); rc.RequestMethod = "GET"; - + Stream s = rc.Request(); if (s.Length > 0) diff --git a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs index d7de9d6..61cfc1a 100644 --- a/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs +++ b/OpenSim/Framework/Communications/Cache/InventoryFolderImpl.cs @@ -37,19 +37,19 @@ namespace OpenSim.Framework.Communications.Cache public class InventoryFolderImpl : InventoryFolderBase { //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + public static readonly string PATH_DELIMITER = "/"; /// /// Items that are contained in this folder /// public Dictionary Items = new Dictionary(); - + /// /// Child folders that are contained in this folder /// public Dictionary SubFolders = new Dictionary(); - + // Constructors public InventoryFolderImpl(InventoryFolderBase folderbase) { @@ -195,15 +195,15 @@ namespace OpenSim.Framework.Communications.Cache return null; } - + /// /// Find a folder given a PATH_DELIMITOR delimited path starting from this folder - /// + /// /// This method does not handle paths that contain multiple delimitors - /// + /// /// FIXME: We do not yet handle situations where folders have the same name. We could handle this by some /// XPath like expression - /// + /// /// FIXME: Delimitors which occur in names themselves are not currently escapable. /// /// @@ -214,7 +214,7 @@ namespace OpenSim.Framework.Communications.Cache { if (path == string.Empty) return this; - + string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None); lock (SubFolders) @@ -228,19 +228,19 @@ namespace OpenSim.Framework.Communications.Cache return folder; } } - + // We didn't find a folder with the given name return null; } - + /// /// Find an item given a PATH_DELIMITOR delimited path starting from this folder. - /// + /// /// This method does not handle paths that contain multiple delimitors - /// + /// /// FIXME: We do not yet handle situations where folders or items have the same name. We could handle this by some /// XPath like expression - /// + /// /// FIXME: Delimitors which occur in names themselves are not currently escapable. /// /// @@ -248,7 +248,7 @@ namespace OpenSim.Framework.Communications.Cache /// /// null if the item is not found public InventoryItemBase FindItemByPath(string path) - { + { string[] components = path.Split(new string[] { PATH_DELIMITER }, 2, StringSplitOptions.None); if (components.Length == 1) @@ -263,7 +263,7 @@ namespace OpenSim.Framework.Communications.Cache } } else - { + { lock (SubFolders) { foreach (InventoryFolderImpl folder in SubFolders.Values) @@ -273,10 +273,10 @@ namespace OpenSim.Framework.Communications.Cache } } } - + // We didn't find an item or intermediate folder with the given name return null; - } + } /// /// Return a copy of the list of child items in this folder diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 1360aa3..4e3840b 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs @@ -90,7 +90,7 @@ namespace OpenSim.Framework.Communications.Cache m_log.WarnFormat( "[USER CACHE]: Tried to remove the profile of user {0}, but this was not in the scene", userId); - + return false; } diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index 1aa8eb0..24fe0f4 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -422,7 +422,7 @@ namespace OpenSim.Framework.Communications.Capabilities mapLayer.Right = 5000; mapLayer.Top = 5000; mapLayer.ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); - + return mapLayer; } @@ -783,7 +783,7 @@ namespace OpenSim.Framework.Communications.Capabilities // TODO: probably make this a better set of extensions here string extension = ".jp2"; - if (m_invType != "image") + if (m_invType != "image") { extension = ".dat"; } diff --git a/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs b/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs index 1c8f27f..b0e2b8f 100644 --- a/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs +++ b/OpenSim/Framework/Communications/Capabilities/LLSDRemoteParcelResponse.cs @@ -34,7 +34,7 @@ namespace OpenSim.Framework.Communications.Capabilities public class LLSDRemoteParcelResponse { public LLUUID parcel_id; - + public LLSDRemoteParcelResponse() { } diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index 2bfe045..08dbc80 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs @@ -41,26 +41,26 @@ namespace OpenSim.Framework.Communications public class CommunicationsManager { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + protected Dictionary m_nameRequestCache = new Dictionary(); public IUserService UserService { get { return m_userService; } } - protected IUserService m_userService; + protected IUserService m_userService; public IGridServices GridService { get { return m_gridService; } } - protected IGridServices m_gridService; - + protected IGridServices m_gridService; + public IInterRegionCommunications InterRegion { get { return m_interRegion; } } - protected IInterRegionCommunications m_interRegion; + protected IInterRegionCommunications m_interRegion; public UserProfileCacheService UserProfileCacheService { @@ -68,36 +68,36 @@ namespace OpenSim.Framework.Communications } protected UserProfileCacheService m_userProfileCacheService; - // protected AgentAssetTransactionsManager m_transactionsManager; + // protected AgentAssetTransactionsManager m_transactionsManager; - // public AgentAssetTransactionsManager TransactionsManager - // { - // get { return m_transactionsManager; } - // } + // public AgentAssetTransactionsManager TransactionsManager + // { + // get { return m_transactionsManager; } + // } public IAvatarService AvatarService { get { return m_avatarService; } } - protected IAvatarService m_avatarService; + protected IAvatarService m_avatarService; public AssetCache AssetCache { get { return m_assetCache; } } - protected AssetCache m_assetCache; - + protected AssetCache m_assetCache; + public IInterServiceInventoryServices InterServiceInventoryService { get { return m_interServiceInventoryService; } - } + } protected IInterServiceInventoryServices m_interServiceInventoryService; public NetworkServersInfo NetworkServersInfo { get { return m_networkServersInfo; } } - protected NetworkServersInfo m_networkServersInfo; + protected NetworkServersInfo m_networkServersInfo; /// /// Constructor @@ -138,7 +138,7 @@ namespace OpenSim.Framework.Communications return null; } } - + public IInventoryServices InventoryService { get diff --git a/OpenSim/Framework/Communications/IGridServices.cs b/OpenSim/Framework/Communications/IGridServices.cs index 509f408..fcc0db5 100644 --- a/OpenSim/Framework/Communications/IGridServices.cs +++ b/OpenSim/Framework/Communications/IGridServices.cs @@ -33,7 +33,7 @@ namespace OpenSim.Framework.Communications public interface IGridServices { string gdebugRegionName { get; set; } - + /// /// Register a region with the grid service. /// @@ -41,7 +41,7 @@ namespace OpenSim.Framework.Communications /// /// Thrown if region registration failed RegionCommsListener RegisterRegion(RegionInfo regionInfos); - + bool DeregisterRegion(RegionInfo regionInfo); /// @@ -51,7 +51,7 @@ namespace OpenSim.Framework.Communications /// /// List RequestNeighbours(uint x, uint y); - + RegionInfo RequestNeighbourInfo(ulong regionHandle); RegionInfo RequestNeighbourInfo(LLUUID regionID); RegionInfo RequestClosestRegion(string regionName); diff --git a/OpenSim/Framework/Communications/IInterServiceInventoryServices.cs b/OpenSim/Framework/Communications/IInterServiceInventoryServices.cs index 24213f2..a1f4c2e 100644 --- a/OpenSim/Framework/Communications/IInterServiceInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInterServiceInventoryServices.cs @@ -32,22 +32,22 @@ namespace OpenSim.Framework.Communications { /// /// Inventory operations used between grid services. - /// + /// public interface IInterServiceInventoryServices - { + { /// /// Create a new inventory for the given user. /// /// /// true if the inventory was successfully created, false otherwise bool CreateNewUserInventory(LLUUID user); - + /// /// Returns a list of all the folders in a given user's inventory. /// /// /// A flat list of the user's inventory folder tree, /// null if there is no inventory for this user - List GetInventorySkeleton(LLUUID userId); + List GetInventorySkeleton(LLUUID userId); } } diff --git a/OpenSim/Framework/Communications/IInventoryServices.cs b/OpenSim/Framework/Communications/IInventoryServices.cs index 08a2c5f..b00b1bf 100644 --- a/OpenSim/Framework/Communications/IInventoryServices.cs +++ b/OpenSim/Framework/Communications/IInventoryServices.cs @@ -41,12 +41,12 @@ namespace OpenSim.Framework.Communications /// Defines all the operations one can perform on a user's inventory. /// public interface IInventoryServices - { + { string Host { get; } - + /// /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the /// inventory has been received diff --git a/OpenSim/Framework/Communications/ISecureInventoryService.cs b/OpenSim/Framework/Communications/ISecureInventoryService.cs index 3608c56..bd962d1 100644 --- a/OpenSim/Framework/Communications/ISecureInventoryService.cs +++ b/OpenSim/Framework/Communications/ISecureInventoryService.cs @@ -40,7 +40,7 @@ namespace OpenSim.Framework.Communications { get; } - + /// /// Request the inventory for a user. This is an asynchronous operation that will call the callback when the /// inventory has been received @@ -102,14 +102,14 @@ namespace OpenSim.Framework.Communications /// Does the given user have an inventory structure? /// /// - /// + /// bool HasInventoryForUser(LLUUID userID); - + /// /// Retrieve the root inventory folder for the given user. /// /// /// null if no root folder was found - InventoryFolderBase RequestRootFolder(LLUUID userID); + InventoryFolderBase RequestRootFolder(LLUUID userID); } } diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 40701f0..c76c078 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -53,14 +53,14 @@ namespace OpenSim.Framework.Communications /// The filename to the user server plugin DLL public void AddPlugin(string provider, string connect) { - PluginLoader loader = + PluginLoader loader = new PluginLoader (new InventoryDataInitialiser (connect)); - // loader will try to load all providers (MySQL, MSSQL, etc) + // loader will try to load all providers (MySQL, MSSQL, etc) // unless it is constrainted to the correct "Provider" entry in the addin.xml loader.Add ("/OpenSim/InventoryData", new PluginProviderFilter (provider)); loader.Load(); - + m_plugins = loader.Plugins; } diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index fd5f139..40064d3 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs @@ -79,7 +79,7 @@ namespace OpenSim.Framework.Communications /// The existing response /// The user profile public abstract void CustomiseResponse(LoginResponse response, UserProfileData theUser, string startLocationRequest); - + /// /// If the user is already logged in, try to notify the region that the user they've got is dead. /// @@ -206,12 +206,11 @@ namespace OpenSim.Framework.Communications userProfile.CurrentAgent.AgentOnline = false; m_userManager.CommitAgent(ref userProfile); - + // try to tell the region that their user is dead. LogOffUser(userProfile, " XMLRPC You were logged off because you logged in from another location"); - + // Reject the login - m_log.InfoFormat( "[LOGIN END]: XMLRPC Notifying user {0} {1} that they are already logged in", @@ -293,7 +292,7 @@ namespace OpenSim.Framework.Communications //return logResponse.ToXmlRpcResponse(); } - userProfile.LastLogin = userProfile.CurrentAgent.LoginTime; + userProfile.LastLogin = userProfile.CurrentAgent.LoginTime; CommitAgent(ref userProfile); // If we reach this point, then the login has successfully logged onto the grid diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index f477df4..feeb666 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs @@ -57,11 +57,11 @@ namespace OpenSim.Framework.Communications PluginLoader loader = new PluginLoader (new UserDataInitialiser (connect)); - // loader will try to load all providers (MySQL, MSSQL, etc) + // loader will try to load all providers (MySQL, MSSQL, etc) // unless it is constrainted to the correct "Provider" entry in the addin.xml loader.Add ("/OpenSim/UserData", new PluginProviderFilter (provider)); loader.Load(); - + _plugins = loader.Plugins; } -- cgit v1.1