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 --- OpenSim/Capabilities/Caps.cs | 8 +- OpenSim/Capabilities/CapsHandlers.cs | 6 +- .../AvatarPickerSearchHandler.cs | 2 +- .../Handlers/FetchInventory/FetchInvDescHandler.cs | 16 ++-- .../FetchInventory/FetchInventory2Handler.cs | 2 +- .../Tests/FetchInventory2HandlerTests.cs | 2 +- .../FetchInventoryDescendents2HandlerTests.cs | 4 +- .../GetDisplayNames/GetDisplayNamesHandler.cs | 4 +- .../GetDisplayNamesServerConnector.cs | 2 +- .../Handlers/GetTexture/GetTextureHandler.cs | 12 +-- .../Handlers/GetTexture/GetTextureRobustHandler.cs | 96 +++++++++++----------- .../Handlers/Properties/AssemblyInfo.cs | 8 +- .../UploadBakedTextureHandler.cs | 8 +- OpenSim/Capabilities/LLSDAssetUploadResponse.cs | 2 +- OpenSim/Capabilities/LLSDAvatarPicker.cs | 2 +- OpenSim/Capabilities/LLSDInventoryItem.cs | 6 +- OpenSim/Capabilities/Properties/AssemblyInfo.cs | 8 +- 17 files changed, 94 insertions(+), 94 deletions(-) (limited to 'OpenSim/Capabilities') diff --git a/OpenSim/Capabilities/Caps.cs b/OpenSim/Capabilities/Caps.cs index 7ba65c9..7492602 100644 --- a/OpenSim/Capabilities/Caps.cs +++ b/OpenSim/Capabilities/Caps.cs @@ -64,7 +64,7 @@ namespace OpenSim.Framework.Capabilities private CapsHandlers m_capsHandlers; - private Dictionary m_pollServiceHandlers + private Dictionary m_pollServiceHandlers = new Dictionary(); private Dictionary m_externalCapsHandlers = new Dictionary(); @@ -160,7 +160,7 @@ namespace OpenSim.Framework.Capabilities public void RegisterPollHandler(string capName, PollServiceEventArgs pollServiceHandler) { // m_log.DebugFormat( -// "[CAPS]: Registering handler with name {0}, url {1} for {2}", +// "[CAPS]: Registering handler with name {0}, url {1} for {2}", // capName, pollServiceHandler.Url, m_agentID, m_regionName); m_pollServiceHandlers.Add(capName, pollServiceHandler); @@ -170,7 +170,7 @@ namespace OpenSim.Framework.Capabilities // uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; // string protocol = "http"; // string hostName = m_httpListenerHostName; -// +// // if (MainServer.Instance.UseSSL) // { // hostName = MainServer.Instance.SSLCommonName; @@ -238,7 +238,7 @@ namespace OpenSim.Framework.Capabilities string hostName = m_httpListenerHostName; uint port = (MainServer.Instance == null) ? 0 : MainServer.Instance.Port; string protocol = "http"; - + if (MainServer.Instance.UseSSL) { hostName = MainServer.Instance.SSLCommonName; diff --git a/OpenSim/Capabilities/CapsHandlers.cs b/OpenSim/Capabilities/CapsHandlers.cs index 6d3b9b5..f5a40df 100644 --- a/OpenSim/Capabilities/CapsHandlers.cs +++ b/OpenSim/Capabilities/CapsHandlers.cs @@ -112,9 +112,9 @@ namespace OpenSim.Framework.Capabilities m_httpListener.RemoveStreamHandler("POST", m_capsHandlers[idx].Path); m_capsHandlers.Remove(idx); } - + if (null == value) return; - + m_capsHandlers[idx] = value; m_httpListener.AddStreamHandler(value); } @@ -147,7 +147,7 @@ namespace OpenSim.Framework.Capabilities { Hashtable caps = new Hashtable(); string protocol = "http://"; - + if (m_useSSL) protocol = "https://"; diff --git a/OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs b/OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs index 426174d..5163169 100644 --- a/OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs +++ b/OpenSim/Capabilities/Handlers/AvatarPickerSearch/AvatarPickerSearchHandler.cs @@ -74,7 +74,7 @@ namespace OpenSim.Capabilities.Handlers int page_size = (string.IsNullOrEmpty(psize) ? 500 : Int32.Parse(psize)); int page_number = (string.IsNullOrEmpty(pnumber) ? 1 : Int32.Parse(pnumber)); - + // Full content request httpResponse.StatusCode = (int)System.Net.HttpStatusCode.OK; //httpResponse.ContentLength = ??; diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index e3a9a22..53ed115 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs @@ -43,7 +43,7 @@ using Caps = OpenSim.Framework.Capabilities.Caps; namespace OpenSim.Capabilities.Handlers { - public class FetchInvDescHandler + public class FetchInvDescHandler { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -53,14 +53,14 @@ namespace OpenSim.Capabilities.Handlers private IScene m_Scene; // private object m_fetchLock = new Object(); - public FetchInvDescHandler(IInventoryService invService, ILibraryService libService, IScene s) + public FetchInvDescHandler(IInventoryService invService, ILibraryService libService, IScene s) { m_InventoryService = invService; m_LibraryService = libService; m_Scene = s; } - + public string FetchInventoryDescendentsRequest(string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { //m_log.DebugFormat("[XXX]: FetchInventoryDescendentsRequest in {0}, {1}", (m_Scene == null) ? "none" : m_Scene.Name, request); @@ -72,14 +72,14 @@ namespace OpenSim.Capabilities.Handlers // correctly mark it as a uuid // request = request.Replace("00000000-0000-0000-0000-000000000000", "00000000-0000-0000-0000-000000000000"); - + // another hack 1 results in a // System.ArgumentException: Object type System.Int32 cannot // be converted to target type: System.Boolean // request = request.Replace("fetch_folders0", "fetch_folders0"); request = request.Replace("fetch_folders1", "fetch_folders1"); - + Hashtable hash = new Hashtable(); try { @@ -90,9 +90,9 @@ namespace OpenSim.Capabilities.Handlers m_log.ErrorFormat("[WEB FETCH INV DESC HANDLER]: Fetch error: {0}{1}" + e.Message, e.StackTrace); m_log.Error("Request: " + request); } - + ArrayList foldersrequested = (ArrayList)hash["folders"]; - + string response = ""; string bad_folders_response = ""; @@ -516,7 +516,7 @@ from docs seems this was never a spec // } // } // } -// +// // foreach (UUID linkedItemFolderId in linkedItemFolderIdsToSend) // { // m_log.DebugFormat( diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs index 8200a96..e239a90 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInventory2Handler.cs @@ -80,7 +80,7 @@ namespace OpenSim.Capabilities.Handlers { // OMG!!! One by one!!! This is fallback code, in case the backend isn't updated m_log.WarnFormat("[FETCH INVENTORY HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); - items = new InventoryItemBase[itemsRequested.Count]; + items = new InventoryItemBase[itemsRequested.Count]; foreach (UUID id in itemIDs) items[i++] = m_inventoryService.GetItem(m_agentID, id); } diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs index 8af3c64..94c2c89 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventory2HandlerTests.cs @@ -120,7 +120,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests string request = "itemsitem_id"; request += "10000000-0000-0000-0000-000000000001"; // Notecard 1 request += ""; - + string llsdresponse = handler.FetchInventoryRequest(request, "/FETCH", string.Empty, req, resp); Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs index 94eef3b..4143aa3 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/Tests/FetchInventoryDescendents2HandlerTests.cs @@ -140,7 +140,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests string request = "foldersfetch_folders1fetch_items1folder_id"; request += m_rootFolderID; request += "owner_id00000000-0000-0000-0000-000000000000sort_order1"; - + string llsdresponse = handler.FetchInventoryDescendentsRequest(request, "/FETCH", string.Empty, req, resp); Assert.That(llsdresponse != null, Is.True, "Incorrect null response"); @@ -203,7 +203,7 @@ namespace OpenSim.Capabilities.Handlers.FetchInventory.Tests // Make sure that the note card link is included Assert.That(llsdresponse.Contains("Link to notecard"), Is.True, "Link to notecard is missing"); - + //Make sure the notecard item itself is included Assert.That(llsdresponse.Contains("Test Notecard 2"), Is.True, "Notecard 2 item (the source) is missing"); diff --git a/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs b/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs index 3e01bbb..41cfdb6 100644 --- a/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesHandler.cs @@ -87,12 +87,12 @@ namespace OpenSim.Capabilities.Handlers OSDMap osdname = new OSDMap(); if(parts[0] == "Unknown") { - osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); + osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddHours(1)); osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddHours(2)); } else { - osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); + osdname["display_name_next_update"] = OSD.FromDate(DateTime.UtcNow.AddDays(8)); osdname["display_name_expires"] = OSD.FromDate(DateTime.UtcNow.AddMonths(1)); } osdname["display_name"] = OSD.FromString(kvp.Value); diff --git a/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs b/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs index 8f70c97..32da1c2 100644 --- a/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs +++ b/OpenSim/Capabilities/Handlers/GetDisplayNames/GetDisplayNamesServerConnector.cs @@ -61,7 +61,7 @@ namespace OpenSim.Capabilities.Handlers if (m_UserManagement == null) throw new Exception(String.Format("Failed to load UserManagement from {0}; config is {1}", umService, m_ConfigName)); - + server.AddStreamHandler( new GetDisplayNamesHandler("/CAPS/agents/", m_UserManagement, "GetDisplayNames", null)); } diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs index 8215124..062a842 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureHandler.cs @@ -55,7 +55,7 @@ namespace OpenSim.Capabilities.Handlers private IAssetService m_assetService; public const string DefaultFormat = "x-j2c"; - + public GetTextureHandler(IAssetService assService) { m_assetService = assService; @@ -83,7 +83,7 @@ namespace OpenSim.Capabilities.Handlers if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID)) { // m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID); - + string[] formats; if (!string.IsNullOrEmpty(format)) { @@ -129,7 +129,7 @@ namespace OpenSim.Capabilities.Handlers } /// - /// + /// /// /// /// @@ -190,7 +190,7 @@ namespace OpenSim.Capabilities.Handlers //response = new Hashtable(); - + //WriteTextureData(request,response,null,format); // not found //m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); @@ -287,7 +287,7 @@ namespace OpenSim.Capabilities.Handlers response["content_type"] = texture.Metadata.ContentType; else response["content_type"] = "image/" + format; - + response["bin_response_data"] = texture.Data; response["int_bytes"] = texture.Data.Length; @@ -400,7 +400,7 @@ namespace OpenSim.Capabilities.Handlers if (image != null) image.Dispose(); - + if(managedImage != null) managedImage.Clear(); if (imgstream != null) diff --git a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs index 5f86ed4..d5df7a2 100644 --- a/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetTexture/GetTextureRobustHandler.cs @@ -24,7 +24,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - + using System; using System.Collections; using System.Collections.Specialized; @@ -44,7 +44,7 @@ using OpenSim.Framework.Servers.HttpServer; using OpenSim.Region.Framework.Interfaces; using OpenSim.Services.Interfaces; using Caps = OpenSim.Framework.Capabilities.Caps; - + namespace OpenSim.Capabilities.Handlers { public class GetTextureRobustHandler : BaseStreamHandler @@ -52,9 +52,9 @@ namespace OpenSim.Capabilities.Handlers private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IAssetService m_assetService; - + public const string DefaultFormat = "x-j2c"; - + // TODO: Change this to a config option private string m_RedirectURL = null; @@ -66,28 +66,28 @@ namespace OpenSim.Capabilities.Handlers if (m_RedirectURL != null && !m_RedirectURL.EndsWith("/")) m_RedirectURL += "/"; } - + protected override byte[] ProcessRequest(string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse) { // Try to parse the texture ID from the request URL NameValueCollection query = HttpUtility.ParseQueryString(httpRequest.Url.Query); string textureStr = query.GetOne("texture_id"); string format = query.GetOne("format"); - + //m_log.DebugFormat("[GETTEXTURE]: called {0}", textureStr); - + if (m_assetService == null) { m_log.Error("[GETTEXTURE]: Cannot fetch texture " + textureStr + " without an asset service"); httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; return null; } - + UUID textureID; if (!String.IsNullOrEmpty(textureStr) && UUID.TryParse(textureStr, out textureID)) { // m_log.DebugFormat("[GETTEXTURE]: Received request for texture id {0}", textureID); - + string[] formats; if (!string.IsNullOrEmpty(format)) { @@ -98,10 +98,10 @@ namespace OpenSim.Capabilities.Handlers formats = WebUtil.GetPreferredImageTypes(httpRequest.Headers.Get("Accept")); if (formats.Length == 0) formats = new string[1] { DefaultFormat }; // default - + } // OK, we have an array with preferred formats, possibly with only one entry - + httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; foreach (string f in formats) { @@ -113,14 +113,14 @@ namespace OpenSim.Capabilities.Handlers { m_log.Warn("[GETTEXTURE]: Failed to parse a texture_id from GetTexture request: " + httpRequest.Url); } - + // m_log.DebugFormat( // "[GETTEXTURE]: For texture {0} sending back response {1}, data length {2}", // textureID, httpResponse.StatusCode, httpResponse.ContentLength); - + return null; } - + /// /// /// @@ -133,16 +133,16 @@ namespace OpenSim.Capabilities.Handlers { // m_log.DebugFormat("[GETTEXTURE]: {0} with requested format {1}", textureID, format); AssetBase texture; - + string fullID = textureID.ToString(); if (format != DefaultFormat) fullID = fullID + "-" + format; - + if (!String.IsNullOrEmpty(m_RedirectURL)) { // Only try to fetch locally cached textures. Misses are redirected texture = m_assetService.GetCached(fullID); - + if (texture != null) { if (texture.Type != (sbyte)AssetType.Texture) @@ -166,14 +166,14 @@ namespace OpenSim.Capabilities.Handlers { // try the cache texture = m_assetService.GetCached(fullID); - + if (texture == null) { // m_log.DebugFormat("[GETTEXTURE]: texture was not in the cache"); - + // Fetch locally or remotely. Misses return a 404 texture = m_assetService.Get(textureID.ToString()); - + if (texture != null) { if (texture.Type != (sbyte)AssetType.Texture) @@ -192,7 +192,7 @@ namespace OpenSim.Capabilities.Handlers newTexture.Data = ConvertTextureData(texture, format); if (newTexture.Data.Length == 0) return false; // !!! Caller try another codec, please! - + newTexture.Flags = AssetFlags.Collectable; newTexture.Temporary = true; newTexture.Local = true; @@ -209,17 +209,17 @@ namespace OpenSim.Capabilities.Handlers return true; } } - + // not found // m_log.Warn("[GETTEXTURE]: Texture " + textureID + " not found"); httpResponse.StatusCode = (int)System.Net.HttpStatusCode.NotFound; return true; } - + private void WriteTextureData(IOSHttpRequest request, IOSHttpResponse response, AssetBase texture, string format) { string range = request.Headers.GetOne("Range"); - + if (!String.IsNullOrEmpty(range)) // JP2's only { // Range request @@ -233,7 +233,7 @@ namespace OpenSim.Capabilities.Handlers // m_log.DebugFormat( // "[GETTEXTURE]: Client requested range for texture {0} starting at {1} but texture has end of {2}", // texture.ID, start, texture.Data.Length); - + // Stricly speaking, as per http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html, we should be sending back // Requested Range Not Satisfiable (416) here. However, it appears that at least recent implementations // of the Linden Lab viewer (3.2.1 and 3.3.4 and probably earlier), a viewer that has previously @@ -244,7 +244,7 @@ namespace OpenSim.Capabilities.Handlers // level 2. If this estimate is greater than the total texture size, returning a RequestedRangeNotSatisfiable // here will cause the viewer to treat the texture as bad and never display the full resolution // However, if we return PartialContent (or OK) instead, the viewer will display that resolution. - + // response.StatusCode = (int)System.Net.HttpStatusCode.RequestedRangeNotSatisfiable; // response.AddHeader("Content-Range", String.Format("bytes */{0}", texture.Data.Length)); // response.StatusCode = (int)System.Net.HttpStatusCode.OK; @@ -257,13 +257,13 @@ namespace OpenSim.Capabilities.Handlers // the rest of the entity. if (end == -1) end = int.MaxValue; - + end = Utils.Clamp(end, 0, texture.Data.Length - 1); start = Utils.Clamp(start, 0, end); int len = end - start + 1; - + // m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); - + // Always return PartialContent, even if the range covered the entire data length // We were accidentally sending back 404 before in this situation // https://issues.apache.org/bugzilla/show_bug.cgi?id=51878 supports sending 206 even if the @@ -275,11 +275,11 @@ namespace OpenSim.Capabilities.Handlers // response.StatusCode = (int)System.Net.HttpStatusCode.OK; // else response.StatusCode = (int)System.Net.HttpStatusCode.PartialContent; - + response.ContentLength = len; response.ContentType = texture.Metadata.ContentType; response.AddHeader("Content-Range", String.Format("bytes {0}-{1}/{2}", start, end, texture.Data.Length)); - + response.Body.Write(texture.Data, start, len); } } @@ -300,7 +300,7 @@ namespace OpenSim.Capabilities.Handlers response.ContentType = "image/" + format; response.Body.Write(texture.Data, 0, texture.Data.Length); } - + // if (response.StatusCode < 200 || response.StatusCode > 299) // m_log.WarnFormat( // "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", @@ -310,7 +310,7 @@ namespace OpenSim.Capabilities.Handlers // "[GETTEXTURE]: For texture {0} requested range {1} responded {2} with content length {3} (actual {4})", // texture.FullID, range, response.StatusCode, response.ContentLength, texture.Data.Length); } - + /// /// Parse a range header. /// @@ -327,18 +327,18 @@ namespace OpenSim.Capabilities.Handlers private bool TryParseRange(string header, out int start, out int end) { start = end = 0; - + if (header.StartsWith("bytes=")) { string[] rangeValues = header.Substring(6).Split('-'); - + if (rangeValues.Length == 2) { if (!Int32.TryParse(rangeValues[0], out start)) return false; - + string rawEnd = rangeValues[1]; - + if (rawEnd == "") { end = -1; @@ -350,27 +350,27 @@ namespace OpenSim.Capabilities.Handlers } } } - + start = end = 0; return false; } - + private byte[] ConvertTextureData(AssetBase texture, string format) { m_log.DebugFormat("[GETTEXTURE]: Converting texture {0} to {1}", texture.ID, format); byte[] data = new byte[0]; - + MemoryStream imgstream = new MemoryStream(); Bitmap mTexture = null; ManagedImage managedImage = null; Image image = null; - + try { // Taking our jpeg2000 data, decoding it, then saving it to a byte array with regular data - + imgstream = new MemoryStream(); - + // Decode image to System.Drawing.Image if (OpenJPEG.DecodeToImage(texture.Data, out managedImage, out image) && image != null) { @@ -380,7 +380,7 @@ namespace OpenSim.Capabilities.Handlers using(EncoderParameters myEncoderParameters = new EncoderParameters()) { myEncoderParameters.Param[0] = new EncoderParameter(Encoder.Quality,95L); - + // Save bitmap to stream ImageCodecInfo codec = GetEncoderInfo("image/" + format); if (codec != null) @@ -404,10 +404,10 @@ namespace OpenSim.Capabilities.Handlers // If we encountered an exception, one or more of these will be null if (mTexture != null) mTexture.Dispose(); - + if (image != null) image.Dispose(); - + if(managedImage != null) managedImage.Clear(); @@ -417,10 +417,10 @@ namespace OpenSim.Capabilities.Handlers imgstream.Dispose(); } } - + return data; } - + // From msdn private static ImageCodecInfo GetEncoderInfo(String mimeType) { diff --git a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs index f628ac1..387b3de 100644 --- a/OpenSim/Capabilities/Handlers/Properties/AssemblyInfo.cs +++ b/OpenSim/Capabilities/Handlers/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.Capabilities.Handlers")] @@ -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/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs index 5536564..80b8306 100644 --- a/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs +++ b/OpenSim/Capabilities/Handlers/UploadBakedTexture/UploadBakedTextureHandler.cs @@ -51,7 +51,7 @@ namespace OpenSim.Capabilities.Handlers { public class UploadBakedTextureHandler { - + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Caps m_HostCapsObj; @@ -81,7 +81,7 @@ namespace OpenSim.Capabilities.Handlers { string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath; string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000"); - + BakedTextureUploader uploader = new BakedTextureUploader(capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_HostCapsObj.AgentID); uploader.OnUpLoad += BakedTextureUploaded; @@ -127,7 +127,7 @@ namespace OpenSim.Capabilities.Handlers asset.Temporary = true; asset.Local = !m_persistBakedTextures; // Local assets aren't persisted, non-local are m_assetService.Store(asset); - + } } @@ -151,7 +151,7 @@ namespace OpenSim.Capabilities.Handlers // m_log.InfoFormat("[CAPS] baked texture upload starting for {0}",newAssetID); } - + /// /// Handle raw uploaded baked texture data. diff --git a/OpenSim/Capabilities/LLSDAssetUploadResponse.cs b/OpenSim/Capabilities/LLSDAssetUploadResponse.cs index 7c4bc97..97491e3 100644 --- a/OpenSim/Capabilities/LLSDAssetUploadResponse.cs +++ b/OpenSim/Capabilities/LLSDAssetUploadResponse.cs @@ -78,7 +78,7 @@ namespace OpenSim.Framework.Capabilities public string state; public int upload_price; public string rsvp; - + public LLSDNewFileAngentInventoryVariablePriceReplyResponse() { state = "confirm_upload"; diff --git a/OpenSim/Capabilities/LLSDAvatarPicker.cs b/OpenSim/Capabilities/LLSDAvatarPicker.cs index d0b3f3a..12e892c 100644 --- a/OpenSim/Capabilities/LLSDAvatarPicker.cs +++ b/OpenSim/Capabilities/LLSDAvatarPicker.cs @@ -42,7 +42,7 @@ namespace OpenSim.Framework.Capabilities { public string username; public string display_name; - //'display_name_next_update':d"1970-01-01T00:00:00Z" + //'display_name_next_update':d"1970-01-01T00:00:00Z" public string legacy_first_name; public string legacy_last_name; public UUID id; diff --git a/OpenSim/Capabilities/LLSDInventoryItem.cs b/OpenSim/Capabilities/LLSDInventoryItem.cs index 958e807..460a215 100644 --- a/OpenSim/Capabilities/LLSDInventoryItem.cs +++ b/OpenSim/Capabilities/LLSDInventoryItem.cs @@ -87,12 +87,12 @@ namespace OpenSim.Framework.Capabilities [OSDMap] public class LLSDInventoryFolderContents { - public UUID agent_id; + public UUID agent_id; public int descendents; - public UUID folder_id; + public UUID folder_id; public OSDArray categories = new OSDArray(); public OSDArray items = new OSDArray(); - public UUID owner_id; + public UUID owner_id; public int version; } diff --git a/OpenSim/Capabilities/Properties/AssemblyInfo.cs b/OpenSim/Capabilities/Properties/AssemblyInfo.cs index f8a9dae..72a5240 100644 --- a/OpenSim/Capabilities/Properties/AssemblyInfo.cs +++ b/OpenSim/Capabilities/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.Capabilities")] @@ -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 // -- cgit v1.1